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!

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 CSS Layout Basics CSS Layout Project Column Layout with Media Queries

Amandeep Pasricha
Amandeep Pasricha
14,932 Points

Why does the third column stay on its own line, while the two columns are able to float together?

Hi, I just wanted to know the logic of why the two columns were able to stay inline together, while the third columns stayed below when you applied float left. In this example, both were 50%. But what if you set the width to something even smaller, could all three columns technically go to the same line?

1 Answer

Steven Parker
Steven Parker
225,770 Points

As long as the total width of all the floats is less 100% or less, they should all appear on the same line.