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

Karin 10

@KarinPortfolio

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

P
Jan 290

@Jan-Dev0

Posted

Here are a few suggestions for improvement:

  1. Use display: flex on the body to center your container both horizontally and vertically. Also, setting min-height: 100vh ensures that the body takes up at least the full height of the viewport, making sure your content is always centered regardless of the viewport height.
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
  1. In general, it’s better to use class names rather than tags as selectors.
  2. It’s also a good practice to style everything for mobile view first, use media queries with min-width, and then adjust the styles for larger screens.

Marked as helpful

0
MikDra1 5,610

@MikDra1

Posted

I encourage you to use this technique to make the card responsive with ease:

.card {
width: 90%;
max-width: 37.5rem;
}

On the smaller screens card will be 90% of the parent (here body), but as soon as the card will be 37.5rem (600px) it will lock with this size.

Also to put the card in the center I advise you to use this code snippet:

.container {
display: grid;
place-items: center;
}

Hope you found this comment helpful 💗💗💗

Good job and keep going 😁😊😉

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