Design comparison
Solution retrospective
I've learnt about positioning and image sizing, I'll try to use other different tools next time.
What challenges did you encounter, and how did you overcome them?The positioning and sizing is very hard for me, so I did google so many times for helps.
What specific areas of your project would you like help with?About CSS box model and positioning
Community feedback
- @danielmrz-devPosted 6 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 helpful1 - Using
- @RobinsonGabrielPosted 6 months ago
Hi Mistersixz,
Looks pretty good, image sizing and getting everything to cooperate is surprisingly hard right? I spent... an embarrassing amount of time the first run I had with this trying to get it to cooperate.
Are you mainly thinking about how to get something to stay in the absolute center of the screen when you talk about positioning? This is part of what I used that W3C's documentation gives as an example: position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
Position is necessary for the top and left to do anything. It's a bit rigid, but if say, this was the only thing on the page it would do its job.
I honestly don't think about the box model a lot but I can maybe try to give some ideas: what element is confusing? Is it like what padding vs margin does? Or..?
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