Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Flexbox used to align the main div vertically and horizontally.

@LucasGabriel2806

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


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.

Community feedback

@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

0

Please log in to post a comment

Log in with GitHub
Discord logo

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