
Design comparison
SolutionDesign
Solution retrospective
Hi everyone! I am not convinced of my solution!
-
In order to be able to center the .container div both horizontally and vertically using Flexbox, I set min-height: 100vh on the body. It was a shot in the dark which seems to be working. Could someone remind me of the role of height in relation to flexbox? I've not fully grasped it.
-
I gave that same .container div margin: 100px auto as I also wanted free space at the top and bottom. Is that correct or is there another way?
-
I didn't set a width on the body as it didn't seem to make much difference. Should I have done?
Many thanks!
Community feedback
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