float

Float an element to the left or right. The content will wrap around an element that is floated.

Value Description
left Align the element on the left.
right Align the element on the right.

Code:

img { float: right;
margin: 4px; }

Display:

The imgages are contained within the paragraph tag. The image has floated to the left, and also to the right because we have used both types of image floating in this example. Notice how the text wraps around the images quite nicely. The imgages are contained within the paragraph tag. The image has floated to the left, and also to the right because we have used both types of image floating in this example. Notice how the text wraps around the images quite nicely.

Compatibility Issues:

IE 5.0 - Value "left" and "right" are broken.
IE 5.5 - Float can by buggy.