HTML and CSS Reference
In-Depth Information
pixels below the top of the element's box, the right edge is 10 pixels to
the right of the box, the bottom is 5 pixels above the bottom of the box,
and the left edge is 10 pixels to the right of the left side of the box.
Note that the
clip
property takes effect only when the
overflow
property
of an element is set to some value other than
visible
. When
overflow
is
set to
visible
, no clipping occurs and the
clip
property is ignored.
The popular browsers don't yet support the
clip
property.
8.4.7.9. The float property
The
float
property designates a tag's display space as a floating ele-
ment and causes text to flow around it in a specified manner. It is gen-
erally analogous to the
align
attribute for images and tables, but you
can apply it to any element, including text. [
The align attribute (deprec-
The
float
property accepts one of three values:
left, right
, or
none
(the
default). Using
none
disables the
float
property. The others work like
their
align
attribute-value counterparts, telling the browser to place the
content to either side of the flow and allow other content to be rendered
next to it.
Accordingly, the browser places a tag's contents (including its margins,
padding, and borders) specified with
float: left
against the left margin
of the current text flow, and subsequent content flows to its right, down
and below the tag's contents. The
float: right
pair puts the tag con-
tents against the right edge of the flow and flows other content on its
left, down and below the tag's contents.
Although the
float
property is most commonly used with tables and im-
ages, it is perfectly acceptable to apply it to a text element. For ex-
ample, the following creates a "run-in" header, with the text flowing
around the header text, as shown in
Figure 8-17
: