Design comparison
Solution retrospective
I've been dabbling with Frontend Mentor for a while now, but only on my local computer. This is my first time doing a push using modern (post 2015) CSS practices. this is also my first public push to GitHub; figured I'd use this basic project as a test drive for other challenges.
Also I made a point to time myself and keep it short. Overshot the timeframe but learned quite a bit about debugging image styling (i.e. that un-asked for whitespace at beneath an image).
Now that I have the process down I'll run a few other timed basic challenges before moving on to full complex templates.
Community feedback
- @danielmrz-devPosted 8 months ago
Hello, @Micahtron!
Your project is looking fantastic!
I'd like to suggest a way to make it even better:
Using
margin
and/orpadding
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 - @Laila-front-devPosted 8 months ago
hello @Micahtron
- nice work, your project is great.
- in the
body
you can use codedisplay: flex ; justify-content: center; align-items: center; flex-direction: column; min-height: 100vh;
0 - @MicahtronPosted 8 months ago
Hey Daniel, Thank you for your help! Getting "demo divs" to behave in the past has always involved a bit of janky CSS.
I've already implemented your advice in another challenge and it works far easier. Thanks.
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