Design comparison
Solution retrospective
Hello everyone!
Question: For the stats (likes, photos, followers): I used padding to make the container bigger and to center the text at the same time, but the div does not fit the card exactly. My question is, how would one go about making the stats div take up all the space left in the card?
Community feedback
- @erickaruguPosted over 3 years ago
Hello Dardian!
Well done on completing this challenge👏👏 Regarding your question I see you have the transform: translateY(-3em) on your .content div and this is pulling all the contents inside this div up leaving a space at the bottom of the card. You can negate this by removing padding: 1.5em and margin-top: 1.5em; and replacing it with transform: translateY(3em) on the .stats div.
That is one way to do it. Happy coding!👩💻
1@TheTryfechtaPosted over 3 years ago@erickarugu32 I implemented your feedback and added a separate div ".divider" for the thin line. Thanks!
1 - @NebiyouErsaboPosted over 3 years ago
This is fantastic. I'm currently working on the same challenge, and I just saw some useful tips from yours. Thanks and keep up the good work!
1 - @Shiryu790Posted over 3 years ago
It's perfectly responsive. But why did you forget the two SVG Which should have been your background images ?
1@TheTryfechtaPosted over 3 years ago@Shiryu790 I know it's "responsive" (as responsive as a fixed size card can be), I'm just wondering if there's a better way to adjust the .stats div size than using padding.
And I don't know why, but I did forget them indeed, so I'll add them now, thanks!
1
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