CSS clear property and its examples

In this chapter you will learn:

About clear property

Example of this property

CSS clear property used with float property to specify the position of the element with respect to floating value. It has three values (left, right and both) which are used to clear floating element.
Example of this property:- Example 1. clear:left;

Guide:-
In this example, div is positioned according to the float value right but the clear property clears the floating value of div 3 which is in color yellow.
Output:-Example 3. float:left; but clear:right;