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

Responsive QR Code

NaQu 570

@NaQu2003

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


Hi, just wanted to ask if there is any better way to center a div horizontal and vertical on a page and i also want be able to increase in size when i add more content to div. Thanks

Community feedback

@claudionetto

Posted

There are other ways to center a div, but the easiest and most recommended for this solution and for most as well is to use flexbox, just as you did in this challenge. As for your second question, your div is already following the size of its children vertically, so if you add more text, it will grow normally, following the defined properties.

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