CSS CSS Basics Basic Layout Clearing Floats


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

Tobias Trinkler
Tobias Trinkler
Full Stack JavaScript Techdegree Student 15,534 Points

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.

Okay, Thanx for your help Tobias.