Basic Qr Code Card (Initial Version)
Design comparison
Solution retrospective
It was one of my first projects that I started alone. I believe with time I get better at this but for now I think it was okay.
What challenges did you encounter, and how did you overcome them?CSS and centering div's was probably the most challenging part.
What specific areas of your project would you like help with?how can I make the code more responsive?
Community feedback
- @HassiaiPosted over 1 year ago
Replace <div class="card-container"> with the main tag to make the content/page accessible. click here for more on web-accessibility and semantic html
Give the alt attribute in the img a value. The value of the alt attribute is the description of the image. For decorative images like icons, there is no need to give it an alt value, for more on alt attribute Click here.
To center .card on the page using flexbox, replace the height in the body with
min-height: 100vh
.For a responsive content,
- Give .container a fixed max-width value, a padding value for all the sides
max-width: 320px which is 20rem/em padding:16px which is 1rem/em
, a background-color of white and a border-radius value, the rest are not needed. - Give the img a max-width of 100% and a border-radius value, the rest are not needed.
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 - Give .container a fixed max-width value, a padding value for all the sides
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