Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Notifications page with vanilla JS

@TomasPereira-Dev

Desktop design screenshot for the Notifications page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I didn't get the image border hover effect right from the comment notification, when you hover over it, the image shrinks for some reason, can you help me with that?

Community feedback

@atmahana

Posted

Hello there. The border property will always take up space. Since you have defined the fixed width for the img element, border will take up space within the element's dimension.

I would suggest using outline to fix the issue since outline is rendered outside the element's content and won't affect the layout.

You can learn more about these two property here: border and outline

I do also noticed that you are using position: absolute on the notification-picture class but you already have these on the parent element

display: flex;
justify-content: space-between;

If you want to adjust the position of the image, you can just use margin or padding instead of absolute positioning.

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord