Design comparison
Solution retrospective
I am just curious if I could have done it somehow better.
Community feedback
- Account deleted
Hi @IoQuality 👋🏻,
Congratulations for your first submission!
You seem to have tried vertically centering the
.qr-container
but didn't succeed. The reason is that its container,body
, needs to span the full viewport height in order for it to work. Settingheight: auto
doesn't work because, in this context,height: auto
just means to take the minimum required height.To achieve vertical centering, you need to set
min-height: 100vh
instead. (and then eliminate the vertical scrolling with eithermargin: 0
orbox-sizing: border-box
)Cheers!
Marked as helpful1@IoQualityPosted over 1 year ago@peterhohk Thank you for the feedback! I already figured out the 100vh part but I didn't think of the margins.
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