Design comparison
Solution retrospective
styling the box
What challenges did you encounter, and how did you overcome them?The avatar image and the buttons,unfortunately I can't fix them
What specific areas of your project would you like help with?I need help with the buttons , i need to make it not to take the whole width I need help wth the avatar image ,I can't make it rounded
Community feedback
- @danielmrz-devPosted 7 months ago
Hello there!
Congrats on completing the challenge! ✅
Your project is looking fantastic!
I'd like to suggest a way to make it even better:
- Using
margin
isn't always the most effective method for centering an element.
Here's a highly efficient approach to position an element at the center of the page both vertically and horizontally:
📌 Apply this CSS to the body (avoid using
position
ormargins
in order to work correctly):body { min-height: 100vh; display: flex; justify-content: center; align-items: center; }
I hope you find this helpful!
Keep up the excellent work!
Marked as helpful0 - Using
- @MtrxxoPosted 7 months ago
Hello, ghostofegypt... You wanted help with your button's width
Just add a specific width to the buttons... Perhaps something close to the width of the whole container... And to place it in the center... Set a certain margin for Top and bottom and set margin left and right to auto... Saw that you used margin bottom only... You can modify by using:
.btn{ margin: 0 auto 25px; } For top, left and right, and bottom respectively
Happy Coding 😊✨
Marked as helpful0 - @kodan96Posted 7 months ago
hi there! 🙌
you can round an image by specifying
{ height: 50px; width: 50px; border-radius: 50%; }
on it. you can use other values for height and width but the two have to match.
Since the buttons should take up almost the entire width of the card just give the card some padding and you're good to go.
Hope this helps! Good luck and happy coding!
Marked as helpful0
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