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 component

#foundation
Kla Mariusโ€ข 30

@Smatsher

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


Hello everybody, building this project was a little bit difficult and it help me figure out some basic of HTML and CSS. Adding a font using external font-family was a little bit difficult and i think, i did it great. I'll appreciate any critique on this project.

Community feedback

Fatโ€ข 850

@Fahatmah

Posted

Hello Kla Marius, there are reports right below of the design comparison that you can check and see if you have anything to work on. In this case, there are unnecessary things in HTML, check on it and after you fix it, you can always generate a new report.

The output of the design comparison seems that you need to center your container in the body. You can test this:

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

And put more spacing or padding specially in the texts part and lastly make the container a little bit bigger if you can see the difference in the comparison.

Marked as helpful

1

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

HTML ๐Ÿ“„:

  • It's not necessary to add the role attribute with the value "main", as the main tag already has this semantic meaning.

CSS ๐ŸŽจ:

  • Instead of using pixels in font-size, use relative units like em or rem. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here ๐Ÿ“˜.
  • To center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here ๐Ÿ“˜.

    body {
        font-family: 'outfit', sans-serif;
        text-align: center;
        background-color: hsl(212, 45%, 89%);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    

I hope you find it useful! ๐Ÿ˜„ Above all, the solution you submitted is great!

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