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 solution

Bel030β€’ 10

@Bel030

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


I had trouble centering the div without affecting the format of the text and image, along with centering the div itself rather than being located on the top-left corner of the body. This was resolved by implementing a margin to the div.

Community feedback

P
Dave Quahβ€’ 670

@Milleus

Posted

πŸ‘‹ Hello! Congratulations on completing your first challenge.

Typically you'd want to add a min-height: 100vh to the body so that the minimum height stretches to match the viewport. After that we could use Flexbox or Grid to help with centering. E.g.

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

or with grid

body {
  display: grid;
  place-items: center;
}

I'd suggest reading up more about Flexbox and Grid. MDN website is a good source for learning. There are also Flex/Grid game websites to help with learning.

Other than the issues highlighted in the accessibility report, one other thing that could be improved is to change the <div class="attribution" to a <p> tag instead as it would be more semantically correct.

Hope this helps and happy coding~

Marked as helpful

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