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

Position relative, margin auto...

Ohad 50

@ohad331

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi there, I had some problems with the layout, I think there must be an easier way to center side by side these div elements.

Community feedback

@fl97

Posted

Hi! I think the best way is to go with flexbox. You can do it like: .container { display: flex; }

.container > div { flex: 1; } In this way you'll have all of your divs in a container and you can center them easily :)

0

Ohad 50

@ohad331

Posted

@fl97 Got it! Thank you very much.

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