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

khalagai 300

@khalagai

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


What are you most proud of, and what would you do differently next time?

It is understanding the concept of CSS positioning. Next time I will use Bootstrap which I expect should be a cleaner code.

What challenges did you encounter, and how did you overcome them?

How to center the QR component on the page and get it responsive. Used the W3School website and Udemy to learn.

What specific areas of your project would you like help with?

How can I use fewer lines of CSS code to get a more responsive output?

Community feedback

@ShoaibShuja

Posted

Amazing job my friend but the component is not perfectly centered and here are some tips to make the code look better.

First of all, for the page styling create a CSS external file and link it to the page.

Second make the body take the whole page and center the elements inside the body by copying these lines of code to your file:

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

Remove the margin-top from .container and change the container width to take less space to match the challenge's main design I would recommend 30% or as you desire.

Learn a bit more about CSS flexbox and grids.

Marked as helpful

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