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 company page attempt

adam-young5• 10

@adam-young5

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 find I struggle a bit with flexbox and organising my CSS.

Any feedback and tips would be much appreciated as I'm new to coding and I'm really trying to learn as much as I can.

Community feedback

Hassia Issah• 50,750

@Hassiai

Posted

Replace <div class="card"> with the main tag to fix the accessibility issue. click here for more on web-accessibility and semantic html

There is no need for user-scalable=no in the meta tag to make your page responsive , use <meta name="viewport" content="width=device-width, initial-scale=1"> instead <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

There is no need to give the body a width of 100%, to center .card on on the page using flexbox add min-height: 100vh to the body.

To center .card on the page using flexbox:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}

Replace the height in .card with a padding value for all the sides, this will prevent the content from overflowing on smaller screens and its a responsive replacement. padding: 15px and give the img a max-width of 100% instead of a width.

Give h1 and p the same font-size of 15px,the same margin-left and margin-right values. Give p a margin bottom and top value.

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

0

adam-young5• 10

@adam-young5

Posted

@Hassiai Thank you for taking the time to reply. Very helpful and much appreciated.

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