Design comparison
Solution retrospective
How to center a box vertically?
Community feedback
- @mohdahsanrazakhanPosted over 1 year ago
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 yourmain
tag and addalt="QR code image"
attribute inside<img src="images/image-qr-code.png">
In place of
<div class="attribution">
you should usefooter
tag.I hope you find this helpful.
Happy coding!
Marked as helpful1 - @SGMaxisPosted over 1 year ago
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 - @VictorBrito13Posted over 1 year ago
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 - @Kabrax01Posted over 1 year ago
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 GitHubJoin 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