Design comparison
Solution retrospective
Just build with HTML, CSS e Vanilla Js
Community feedback
- @Zy8712Posted about 1 year ago
Your site looks pretty good and functions as expected. If you want to center your boxes what you can do is add the following code:
body{ width: 100vw; height: 100vh; } main{ width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
The code above makes sure your body and main take up the entire viewport, and then it centers the box using the attributes
display
,flex-direction
,justify-content
, andalign-items
.Additionally if you want to keep your attribution out of the way so it doesn't mess with the box centering, you can add something like:
footer{ position: absolute; bottom: 8px; }
Besides that your solution is very solid. Nice work 👍
Marked as helpful0 - @MaximilianoDanielGarciaPosted about 1 year ago
Hi @aslinsjr, good job!
If you're wondering how to center it just add this:
body { display: grid; place-items: center; min-height: 100vh; } footer { position: absolute; bottom: 30px; }
Marked as helpful0@aslinsjrPosted about 1 year agoThanks bro, i'll improve that! @MaximilianoDanielGarcia
0
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