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

Margin of auto for the wrapper to center it

@Natty-tech

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 challenges did you encounter, and how did you overcome them?

The challenges I encountered is how i should center my elements, and also how to make the qr responsive.

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

I would like to know if there is a better way to make the qr more responsive

Community feedback

P
Jake Godsall 1,390

@jakegodsall

Posted

Hi 👋

Great work with this component.

I can make a few comments regarding responsivity. I'd recommend changing the way you're thinking about defining the width in the desktop view. From what I understand you're deciding on how you want the component to look at full width, which is approximately 15vw.

The problem with this is that at smaller viewports (approx width: 450px) the component ends up with a width of around 100px which really is too small.

You'd be better to use a much wider width for the component, let's say 90% and then add a max-width with a fixed-value for the larger screen size. That way you'll have a more appropriate width across a range of viewport widths.

.qrwrapper {
    width: 90%;
    max-width: 300px;
}

Thanks

Marked as helpful

0

@Natty-tech

Posted

Hello @jakegodsall! Thanks for the advice on how to make the the qr more responsive. I have been meaning to contact u so that we could work together on different projects so that i could learn from u, that's if you are willing to though.

Thanks again for the comment!

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