Design comparison
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
- @atmahanaPosted about 1 year ago
Hello there. The
border
property will always take up space. Since you have defined the fixed width for theimg
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
andoutline
I do also noticed that you are using
position: absolute
on thenotification-picture
class but you already have these on the parent elementdisplay: flex; justify-content: space-between;
If you want to adjust the position of the image, you can just use
margin
orpadding
instead of absolute positioning.Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin 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