Design comparison
Solution retrospective
How do I decrease the size between the bottom of the card and creator's avatar and info? The very bottom part has too much space between elements but I don't know how to decrease that size. Tried margin-bottom and did not work. Anyway, this is the best I can do for this one.
Community feedback
- @Yasmine10Posted over 1 year ago
Hi @bilguun1130
The reason for the spacing issue is because you used grid and then you downsized the icon image with percentages. It doesn't recognise that the icon image is not at 100% anymore, but if you use for example
height: 3rem
on the avatar image it should work just fine.To prevent that issue in the future you could also add
align-items: flex-start
to your.main-content
class, that way you can also see that the image is stillheight: 100%
instead of 30%Otherwise great solution!
Hope this helps 😊
Marked as helpful1 - @bertfarolPosted over 1 year ago
You don't have to use "display: grid" in class main-content. Just add padding to all div manually or change the "display:grid" into "display:flex" and add "flex-direction: column"
- just make sure you set the size of your avatar to 50px or depends on the design.
1@bilguun1130Posted over 1 year ago@bertfarol Thank you for this comment. I just fixed it.
0
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