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

HTML5, CSS, FLEXBOX

Ann Mukami 260

@Kiunga1

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


##First project. qr-code-component-main.

Please tell me how I can improve. My biggest challenge was Layout and Positioning: especially positioning of the QR code component. I finally managed by following the CSS Flexbox guide.

Community feedback

@ZubairAbid101

Posted

Hello!!! 👋

Congratulations on completing the challenge! 🎉

There are some things that you can improve in the code,

  • Instead of using the <section> element, use the <main> element instead since the <section> element is preferably used when there are multiple sections on a single webpage. Since this is a simple design with only one component a <main> element will suffice.
  • Give the <body> element a min-height: 100vh. This will cause the align-item: center and justify-content: center to work properly making the component be at the center dynamically.
  • Another change that can be made is that for mobile layout don't give the <body> element a fixed width. Instead set the <section> element to a width relative to the viewport size by doing width: 90vw. Also don't specify the height of the <body> element as a fixed value instead let the component occupy as much height as it needs to.

I hope you find this comment helpful! 🙂

Did you know that there's a mark as helpful and an up-vote option? 🤔

There's even a Follow button!!! 😁

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