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 css flex solution

vanamos12 10

@vanamos12

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


How to center a box vertically?

Community feedback

md_mark 180

@mohdahsanrazakhan

Posted

Hello there 👋. Congratulations on successfully completing the challenge!

I have recommendations regarding your code that I believe it will great interest to you.

HTML: This solution generates accessibility error reports. So fix it by replacing the <div class="main"> element with the semantic element <main> in your index.html file to improve accessibility and organization of your page.

You should add one h1 tag inside your main tag and add alt="QR code image" attribute inside <img src="images/image-qr-code.png">

In place of <div class="attribution"> you should use footer tag.

I hope you find this helpful.

Happy coding!

Marked as helpful

1

@SGMaxis

Posted

You forgot to set the height of the body element. Set it to 100vh. It's required if you want to use align-items: center; to center the box on the screen.

3

@VictorBrito13

Posted

You can add this to your body:

This gonna make that the body takes the 100 percent of the viewport and the align-items gonna take the desire effect

{ min-height: 100vh; margin: 0px; }

2
Kabrax01 100

@Kabrax01

Posted

To your body tag add: min-hight: 100vh

and You are set :D

FIrst <h> element on page should always be <h1>

Also You should edit or remove attributions section.

Anyway good job 👍and keep it up! 🏋️‍♂️

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