Responsive QR code page using HTML and CSS.

Solution retrospective
I want help on the positioning of elements/div in webpage. How can I place a section or an element in the exact center of a webpage?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @ManuGil22
Hey @AbhishekBh72
To position a element in the exact center of a page you can use this attributes on the body element:
- height: 100vh; //To make the height of the body 100 viewheight units
- display: flex; //To use flexbox
- justify-content: center; //To center elements horizontally
- align-items: center; //To make all items center in the page vertically
I hope I answered your question! Keep pushing and happy coding!
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