position :
absolute |
fixed |
relative |
static
Compatibility: IE4+ N4+
Version: Level 2 Inherited: No
The position property is one of two properties that can be used to set the
physical position of an element in terms of where and how it will appear on a page.
The other positioning property is float.
These two properties allow you to select among the three possible positioning schemes
in CSS, which are:
- normal flow The elements are displayed in the normal order that they occur.
- floats The element is shifted to the right or left.
Other elements, such as text, can optionally flow around the side.
- absolute positioning The element is offset a specified distance with respect
to the position it has in the normal flow.
The position property can be used in conjunction with the bottom, left, right,
and the top properties.
absolute
The absolute value allows an element to be placed anywhere on a page.
The position is set using the bottom, left, right, or top properties.
fixed
The fixed value is currently not recognized by any browser.
relative
The relative value moves the element an offset distance relative to the position
it has in the normal flow of the display of the page.
static
The static value dictates that an element will be positioned as it
occurs in the normal flow of the display of the page.
Code:
p.one {
position: absolute;
bottom: 1in;
left: 1in;
right: 1in;
top: 1in;
}
Output:
Click to view example in separate window
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information
|