QR Code - flexbox solution

Please log in to post a comment
Log in with GitHubCommunity feedback
- @Hassiai
Replace <div class="flex-container"> with the main tag and <h2> with <h1> to fix the accessibility issues. click here for more on web-accessibility and semantic html
To center .flex-element on the page using flexbox, replace the height in the body with min-height: 100vh.
Give h1 and p the same font-size of 15px which is 0.9375rem, text-align: center, the same margin-left, margin-right and margin-top values. Give p a margin bottom value.
There is no need to give .flex-element a height
For a responsive element which wont require a media query for this challenge, give .flex-element a fixed max-width value,
max-width:320px
and replace the width in the img width max-width for a responsive image.Use relative units like rem or em as unit for the 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
Marked as helpful - @ecemgo
Some recommendations regarding your code that could be of interest to you.
HTML:
- Please replace
<div class="flex-container">
with the<main>
tag,<div class="attribution">
with the<footer>
tag to fix the accessibility issues. :) - You can also reach more information about HTML5 Semantic from Semantic HTML and Using Semantic HTML Tags Correctly.
Hope I am helpful. :)
Marked as helpful - Please replace
Join 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