HTML and CSS Reference
In-Depth Information
Figure 5.10
Our Styles Conference home page now includes a three-column layout
The
source
code
for
the
exercises
within
this
lesson
can
be
found
at
Uniquely Positioning Elements
Every now and then we'll want to precisely position an element, but floats or inline-block
elements won't do the trick. Floats, which remove an element from the flow of a page,
often produce unwanted results as surrounding elements flow around the floated element.
Inline-block elements, unless we're creating columns, can be fairly awkward to get into
the proper position. For these situations we can use the
position
property in connection
with box offset properties.
The
position
property identifies
how
an element is positioned on a page and whether
or not it will appear within the normal flow of a document. This is used in conjunction
with the box offset properties—
top
,
right
,
bottom
, and
left
—which identify ex-
actly
where
an element will be positioned by moving elements in a number of different
directions.
By default every element has a
position
value of
static
, which means that it exists in
the normal flow of a document and it doesn't accept any box offset properties. The
stat-
Search WWH ::
Custom Search