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 CSS Basics (2014) Basic Layout Clearing Floats

float

If we want to display two rows then we use float property and display side by side but what if we want to display 3 or 4 columns side by side?

3 Answers

Hi Ramesh,

I this example he only floats two elements, which means one would be to the left and the other one two the right.

Let's say you would have three or more elements that you want to float next to each other, you would give all of them a float property of left or right.

The effect of giving the a float property right would be that it reverses the order in which the elements are displayed the rest stays the same.

Let me know if that answered your questio!

Yeah but the images and content overlapped to each other.

You would also have to adjust their width as well.

Okay, Thanx for your help Tobias.