The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's Style Sheets Reference

| Index | Current Category: Layout |
| Previous Style: caption-side | Next Style: clip |


clear

Specifies whether the element allows text to flow around if if an earlier object is floating.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later
Notes:
  • This style replaces the HTML <BR CLEAR> attribute.
Possible Values:
both
The next line of text appears below any previously floated object.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later

left
The next line of text appears below any previously left-floated object.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later

none
Text continues to flow around the object.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later

right
The next line of text appears below any previously right-floated object.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later

Example:
<IMG SRC="thinker.gif" STYLE="float: left">
Because the <IMG> tag specifies float: left, 
this text flows around the image on the right. That looks nice, but you may decide you have had just 
about enough of this floating business, thank you very much. So you add a <P> tag and specify 
clear: left, like so:
<P STYLE="clear: left">
That way, the next line appears below the image.
How It Looks:
Because the <IMG> tag specifies float: left, this text flows around the image on the right. That looks nice, but you may decide you have had just about enough of this floating business, thank you very much. So you add a <P> tag and specify clear: left, like so:

That way, the next line appears below the image.


| Index | Current Category: Layout |
| Previous Style: caption-side | Next Style: clip |