Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

My solution for QR code component

@darkk-lord

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@RanitManik

Posted

Unit Selection:

  • Consider opting for rems (rem) instead of pixels (px) in properties like width, height, margin, padding, and font-size. Using rems provides better scalability and responsiveness, adapting to varying user preferences and device screen sizes. You can find more details in this article.

Illustrative Example:

/* Utilizing rem for enhanced scalability */
.container {
  width: 57.4375rem; /* Equivalent to 919px */
  font-size: 1rem; /* Equivalent to 16px */
}

@media Query Enhancement:

  • Your existing @media query focuses on centering content through grid and place-items. However, there's an issue with the unit used for min-width in the body selector.
  • Additionally, for improved responsiveness, consider replacing width with max-width for the main section.
  • If display: grid; and place-items: center; are already in use for content centering, you can eliminate the min-width and margin properties.

Refined Code:

@media (min-width: 375px) { 
  body {
    min-height: 100vh;
    display: grid;
    place-items: center;
  }

  main {
    max-width: 350px; /* Opt for max-width for better responsiveness */
  }
}

These modifications aim to enhance your code's clarity, adaptability, and responsiveness.

I hope you find my feedback helpful. Please mark it as helpful if you do.

0

@darkk-lord

Posted

Thank you, @RanitManik

0

Please log in to post a comment

Log in with GitHub
Discord logo

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