Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Jorge Vega
seal-mask
.a{fill-rule:evenodd;}techdegree
Jorge Vega
Front End Web Development Techdegree Student 2,905 Points

Flex Box vs Inline-Block

Hello!

Which is the best way to resolve this challenge?

Flexbox or inline-box. I personally used flexbox but I am not sure if that is the best way.

What do you guys think?

2 Answers

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

Flexbox is a more up to date CSS Layout method. Having said that though, you can achieve to make this layout in multiple ways. It doesn't really matter which CSS layout method you use, as long as it achieves the result.

The difference here is that, with inline-block display, you have to compensate for the whitespace made by the browser. Whereas the advantage with using Flexbox is that you don't have to deal with stuff like that, especially using clearfix methods to clear Float layouts.