@riccardobellini
Posted
I would avoid using margins for the card component and center it both horizontally and vertically using flexbox:
body {
display: flex;
align-items: center;
justify-content: center;
}
Marked as helpful
Submitted
@LucasGabriel2806
What are you most proud of, and what would you do differently next time?
I managed to make the project identical to the design, using beginner properties, and Flexbox to align the main div vertically and horizontally. I did this project once, it wasn't identical so I'm redoing it, I'm happy because I managed to fix the content well, improve the design in code form.
What challenges did you encounter, and how did you overcome them?
At first it was difficult to center the main div vertically, to center it horizontally I used margin: auto, but after studying more and getting to know Flexbox, I learned how to center it vertically and horizontally in a very simple way.
@riccardobellini
Posted
I would avoid using margins for the card component and center it both horizontally and vertically using flexbox:
body {
display: flex;
align-items: center;
justify-content: center;
}
Marked as helpful
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