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

Desktop-first QR code component

@sandraise

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


Here's my attempt at the design. I would like some feedback on how to make this mobile responsive, I'm not sure the media query I used is quite right. Thanks!

Community feedback

@Nick-Gabe

Posted

Good work, very organized html! :)

I noticed your qr-code is on the upper left. A tip I give is that to center the container on the screen, one option is using flexbox on the body and defining a height (100vh is good for desktop, but doesn't work well for mobile) and a witdh (100%).

body {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

Links if you want to see more: Flexbox, Css Units(vh, vw...)

Marked as helpful

1

@sandraise

Posted

@Nick-Gabe Thanks, I'll look into that vh unit this week. That has trimmed off a bunch of lines off my code, great!

0
Dev Rathore 2,600

@GitHub-dev12345

Posted

Use this code in the body tag :-

Padding :10px; Margin : 110px auto: Width: 100%; Max-Width: 1440px;

Marked as helpful

1

@sandraise

Posted

@GitHub-dev12345 Ok thank you!! That's much better. I will practice responsiveness on other challenges Cheers!

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