QR Code Componet Using HTML and Css

Solution retrospective
I found it difficult to make the content in the middle of the page. Are there any way to make it easier and more understandable ? Thank you so much
Please log in to post a comment
Log in with GitHubCommunity feedback
- @ParvizAzeroglu
Generally, I use flex to center items within a container. This means that I write the following code in CSS:
body { display: flex; align-items: center; justify-content: center; height: 100vh; }
However, you can also use
margin: auto;
in the body. Such as :body { margin: auto; height: 100vh; }
But remember that this code is only useful for centering a single item; you can't use it for more than one item.
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