QR Code Component Solution

Solution retrospective
Best practice question: I've been taught that it's incorrect to use flexbox for only one item. I made the main section display:flex which I'm also not sure is the best practice versus using a seperate div for the purposes of making that a flex container
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Bader-Idris
You can set the container in the middle of the screen whatever user changes it when you add these properties to it in CSS:
.container { display: absolute; top:50%; left: 50%; transform: translate(-50%, -50%); }
the new feature is transform, it has many lovely properties you can discover, I personally love it. Hope it's useful.
and about flexBox, you can use it with any parent element that has 2 elements or more
Marked as helpful
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