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

Basic HTML and CSS solution for desktop and mobile.

Samueleโ€ข 170

@frasconi00

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


Feedback welcome!

Community feedback

Adrianoโ€ข 34,090

@AdrianoEscarabote

Posted

Hi Samuel, how are you?

Welcome to the front-end mentor community.

I really liked the result of your challenge, but I have some tips that I think you will like:

1- Document should have one main landmark, you could have put all the content inside the main tag click here

I noticed that there is a scrollbar on the page, and the content is not centered, we can arrange both things like this:

I removed this one:

.container { /* margin: 20vh auto; */ }

I added these:

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

This will make the content centered on any resolution.

  • { margin: 0; padding: 0; box-sizing: border-box; }

This will remove the scrollbar, adding margin and padding 0 to all elements on the page.

Hope it helps... ๐Ÿ‘

The rest is great!!

Marked as helpful

1

Samueleโ€ข 170

@frasconi00

Posted

@AdrianoEscarabote Thanks a lot for the feedback and advice, especially for the scrollbar removing tips! Will implement this for sure in my future projects ๐Ÿ‘

1
Lucas ๐Ÿ‘พโ€ข 104,420

@correlucas

Posted

๐Ÿ‘พHello SAMUELE, congratulations for your first solution!๐Ÿ‘‹ Welcome to the Frontend Mentor Coding Community!

Great solution and great start! By what I saw youโ€™re on the right track. Iโ€™ve few suggestions to you that you can consider to add to your code:

Youโ€™ve used px as the unit for sizes but the problem with pixels is that its not optimized for multiple devices and screens. So a good fit its to use rem or em that have a better performance and make your site more accessible between different screen sizes and devices. REM and EM does not just apply to font size, but to all sizes as well.

Something I've noticed in your code is that in many occasions you've added some <div> to wrap contents that don't really need to be inside of a div block. Note that for this challenge all you need is a single block to hold all the content, can be <div> or <main> if you want to use a semantic tag to wrap the content, the cleanest structure for this challenge is made by a block of content with div/main and all the content inside of it (img, h1 and p) without need of any other div or something. See the structure below:

<body>
<main>
<img src="./images/image-qr-code.png" alt="Qr Code Image" >
 <h1>Improve your front-end skills by building projects</h1>
<p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p>
</main>
</body>

โœŒ๏ธ I hope this helps you and happy coding!

Marked as helpful

1

Samueleโ€ข 170

@frasconi00

Posted

@correlucas You're absolutely right, thank you for your tips! I really appreciate feedback as this is my first ever project. Hope to improve soon ๐Ÿ’ช

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