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

Simple QR Code Component with HTML and CSS

#bem#sass/scss

@KrzysztofRozbicki

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

Hassia Issah 50,830

@Hassiai

Posted

To center .wrapper on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.

To center .wrapper on the page using flexbox:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
To center .wrapper on the page using grid:
body{
min-height: 100vh;
display: grid;
place-items: center;
}

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

2

@KrzysztofRozbicki

Posted

@Hassiai Hello - thank you for reply and advice. I know the flex and grid method. I would love to know if it is better than the method i Used- which is simply absolute positioning with -50% translate.

0
Hassia Issah 50,830

@Hassiai

Posted

@KrzysztofRozbicki it is a responsive method, its centers your content on the screen irrespective of the screen size.

Marked as helpful

1

@KrzysztofRozbicki

Posted

@Hassiai ok, will check that. I have noticed that my method is also responsive 100% because the position is % of screen but also have seen that it is kind of messed up when i am putting the mobile device horizontally. Will check the flex method for sure in the next challenge. Thanks.

1
isaac 280

@katongole-isaac

Posted

good job buddy !! 👍🏽👍🏽👍🏽

2

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