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

mcstarley1215โ€ข 110

@mcstarley1215

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


Still trying to figure out flexbox. Flexbox What is the best practice on mastering flexboxes?

Community feedback

Alberto Ledesmaโ€ข 370

@ledesmx

Posted

Hi @mcstarley1215 ๐Ÿ‘‹

Great job on your solution!

You almost have it centered. The body takes the height of the content inside itself like its own height. Meaning when you try to center its content vertically it doesn't work unless you explicitly set the body's height. Fortunately, it's pretty straightforward to do it.

You only need to add the following code for the body tag:

body {
  min-height: 100vh;
}

It sets the minimum height of the body tag for the 100% of the viewport's height. Now your content will be centered vertically.

Regarding to you question I suggest checking out this game about Flexbox: https://geddski.teachable.com/p/flexbox-zombies

And practice a lot what you learn with projects like this.

I hope this helps a little.

Marked as helpful

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