Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Request path contains unescaped characters
Request path contains unescaped characters
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Creating QR Code using flex box

@Elvy1999

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


Are there any best practices that I should have done when coding the solution for this challenge?

Community feedback

@freaky4wrld

Posted

Hey there, here's some suggestions that might do the stuff for you....

  • first of all to center your container class you don't have to make the body element a flex, you can achieve it by giving container class(preferred in % not in hard-coded px units) and use the margin property to center it.........
.container{
    width: [some-value]%;
    margin: [some-value]rem/em/% auto
  • well in the above code we are giving the container class the same top&bottom margin and for the left&right we are letting the browser set some margin.... and that's making our container class to be centered.....

  • in the container class you can add some padding.... to make the container look good

  • for the rest of the elements in the container like h1, p, img elements, try to wrap them in two different divs, divs are used for grouping and there's no harm in using them...

<div class="container">
   <div class="qr-image">
       <img/>
   </div>
   <div class="card-text">
        <h1></h1>
        <p></p>
   </div>

Hope this helps in making the required modification..... glad I can help you!!

1

@Elvy1999

Posted

@freaky4wrld I appreciate the feedback!

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