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

QR code component using CSS Grid and Flexbox

#accessibility
Azianβ€’ 50

@dwangsst

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

it is much easier to vertically align content with Flexbox in a single dimension layout

What challenges did you encounter, and how did you overcome them?

using CSS Grid to specify space between content is much easier

What specific areas of your project would you like help with?

styling with CSS, especially with sizing units when to use px, em, rem, percent, etc...

Community feedback

Daniel πŸ›Έβ€’ 38,690

@danielmrz-dev

Posted

Hello there!

Congrats on completing the challenge! βœ…

Your solution looks excellent!

I have just one suggestion:

  • Use only <main> to wrap the main content instead of <main> and <article>.

πŸ“Œ The tag <article> would make more sense if the card was part of a bigger website (in certainly would in real world), but here it is all we have on the screen.

Unless you have a specific reason to use both, there's no need, considering that you can achieve the same result with only one. It also makes it easier positioning the elements inside.

This tag change does not impact your project visually and makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.

I hope it helps!

Other than that, great job!

Marked as helpful

1

Azianβ€’ 50

@dwangsst

Posted

@danielmrz-dev thanks for your supportive feedback, I've adjusted my solution based on that.

Now, my solution is clean from the accessibility report and HTML report

1
P
KodaπŸ‘Ήβ€’ 1,930

@kodan96

Posted

hi there πŸ‘‹

You should avoid hard-coded values (pixels) most of the time. When you use these values you give up responsibility (or you make it harder for yourself at least)..

Typically you will increase the font-size property with @media queries. If you have hard-coded values all over your CSS, you need to modify every element's font-size. On the other hand, if you use rem-s all you need to do is changing the font-size in your CSS :root selector and all your elements will have a new size based on that value.

I usually use em for padding and margin for text-based elements, since their margin usually based on their font-size, and again, when you change the font-size in :root these values will scale up as well without you touching them, making your job easier and your page maintainable.

Hope this helps! πŸ™

Good luck and happy coding!

Marked as helpful

1

Azianβ€’ 50

@dwangsst

Posted

@kodan96 thanks for your supportive feedback, I've adjusted my solution based on that.

1

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