HTML and CSS Reference
In-Depth Information
Figure 3.18: ordered and unordered lists with different
list-style-type
values
HTML elements that are part of the normal content low in a document are said
to have
static
positioning. But web authors are not required to go with the low.
Any HTML element can be positioned precisely on the browser's page by setting
the CSS positioning properties:
position
,
top
,
right
,
bottom
, and
left
.
he position property can have one of four values:
.
static
his is the default. Normal, loated, and inline elements ill the
browser's window in the same order as presented in the HTML source.
.
relative
he element's position is ofset by some amount from its
static
position. he space the element formerly occupied is preserved so
that all other document elements keep their original positions.
.
absolute
he element is removed from the document low and posi-
tioned with respect to an ancestor element. he space the element occu-
pied is closed up, and other HTML elements are repositioned as if the
element was never there.
.
fixed
he element is removed from the document low and positioned
with respect to the browser's window. Like
absolute
, the space it occu-
pied is removed, and other elements act as if it never existed.
he
top
,
right
,
bottom
, and
left
properties determine how far the posi-
tioned element is ofset from the edges of its containing element. hey can be