Design comparison
Solution retrospective
The difficult bit for me was
- Vertically centering the div, though I found solutions to that (setting Body to Flex was my least favorite but was what I made use of)
- My design was desktop/laptop first but after facing issues with making the div scale with the height of the screen for mobile devices, I opted for a mobile-first approach (my first time doing so) and it was a whole lot easier and responsive
Cheers to learning and improving 🥂
Community feedback
- @HassiaiPosted over 1 year ago
Replace <div class="flex-container"> with the main tag to make the page/content accessible. click here for more on web-accessibility and semantic html
To center .flex-container on the page using flexbox, replace the height in the body with
min-height: 100vh
.Give the body a background-color of hsl(0, 0, 95%).
Give .div-one, .div-two and . div three the same padding values for all the sides.
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here and here
Hope am helpful.
Well done for completing this challenge. 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