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 (FLEX)

@YOUXIE-DEV

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


All comments are welcome, Thank You!

Community feedback

Hassia Issah 50,650

@Hassiai

Posted

Replace <section> with the main tag, <h2><p> with <h1> and <h3><p> with <p> to fix the accessibility issue. for more on semantic html visit https://web.dev/learn/html/semantic-html/

Give .QR a fixed width instead of a percentage width, the fixed width can either be 300px or 400px. Add min-height:100vh to the section/the main to center .QR on the page using flexbox, instead of giving it a margin-top value. There is no need to give .QR a margin value.

Use rem or em as unit for the padding, margin, width and preferably rem for the font-size for more on this watch this https://youtu.be/N5wpD9Ov_To there is no need to give the text a font-size.

Hope am helpful Happy coding.

Marked as helpful

1
Favour 2,160

@Nadine-Green

Posted

HEY YOUXIE!

Congratulations on completing your first challenge

Concerning your question about centering, One of the best ways for centering would be to give the body a height of 100vh height:100vh then a display of grid display: grid and then using the code place-items: center

There is no need to place a p inside an h2 or h3, this will get rid of the error on your HTML report.

You will also need to increase the width of your parent container and set a max-width for as well so that it does not constantly increase in size.

HOPE I COULD BE OF HELP :)

HAPPY CODING!

Marked as helpful

1

@YOUXIE-DEV

Posted

@Nadine-Green Thank you for your answer, I will apply what you told me!

0
Favour 2,160

@Nadine-Green

Posted

@YOUXIE-DEV

Glad i could be of help :)

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