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 (HTML + CSS)

@nerdy-guy

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 everyone. This is my solution for QR code component. Feedbacks are appreciated, especially on centering the container.

Community feedback

Saulius K. 560

@TH3RIV

Posted

Hi, @nerdy-guy!

You can very easily center your container using flexbox or grid on the parent container:

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

or

body {
   min-height: 100vh;
   display: grid;
   place-content: center;
}

This way you do not need to use margins to center you containers, it centers it in the parent container.

Also try to avoid using px values as much as possible and use rem instead.

Hope this helps!

Marked as helpful

2

@nerdy-guy

Posted

@TH3RIV Thanks for your feedback, it was very helpful.

0
Adriano 34,000

@AdrianoEscarabote

Posted

Hi Ahmed Arafa, how are you? Welcome to the front-end mentor community! I really liked the result of your project, but I have some tips that I think you will enjoy:

To improve the responsiveness of the project, we are going to make some changes to the project:

.container {
    max-width: 330px;
    width: 100%;
}
img {
    max-width: 300px;
    width: 100%;
}

The rest is great!

I hope it helps... 👍

Marked as helpful

1

@nerdy-guy

Posted

@AdrianoEscarabote Thanks for your feedback, it's a lot better now on smaller screens.

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