This is a solution to the QR code component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
- Solution URL: Add solution URL here
- Live Site URL: Add live site URL here
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
I have learned how to center a div vertically and horizontally.
See below to learn how to do that:
<div class="container">
<div class="content">
<!-- Your content here -->
</div>
</div>
.container {
display: flex;
align-items: center; /* Vertical center alignment */
justify-content: center; /* Horizontal center alignment */
height: 100vh; /* Set the container height to full viewport height */
}
.content {
/* Add styling to your content */
}
- Example resource 1 - This helped me for a lot of things. This is a AI chat bot and when we ask how to do a thing, it will tell us more clearly.
- Website - Maleesha Pramud
- Frontend Mentor - @maleeshapramud2005
- Twitter - @LMpramudk