The clear property is used to cancel the effect of float. Possible values for the clear property are:
CSS declaration:
#leftfloat { float:left; } #clearleft { clear:left; } |
the following HTML,
<span id="leftfloat"><img src="yp.jpg"></span>This example <span id="clearleft"> illustrates how clear:left breaks the float property. </span> |
renders,
This example illustrates how clear:left breaks the float property. |
Notice that once the clear:left style is applied, the float:left style no longer applies, and all the text following the clear:left style appear below the image.
0 comments:
Post a Comment