Responsive landing page using Flexbox and media query
Design comparison
Community feedback
- @HassiaiPosted over 1 year ago
wrap <div class="attribution"> in the footer tag to fix the accessibility issue.
to center the main on the page using flexbox, add min-height:100vh; display: flex; align-items: center: justify-content: center; to the body.
USING FLEXBOX: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
Replace the height in the main with a padding value for all the sides, this will prevent the content from overflowing on smaller screens and its a responsive replacement.
For a responsive content which wont require a media query for this challenge, give the main a fixed max-width value and increase its value.
max-width:400px
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
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
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