Positioning elements

Css allows to define exactly where an element should be rendered.

The possible values are.

PropertiesDescription
staticcorresponding to the normal flow (default)
relativethe element participates in normal flow but rendered with an offset relative to its normal position. After this translation, the element can overlap other elements
absoluteThe element is eliminated from the normal flow and is rendered with an offset relative to the first positioned parent element
fixedThe element is eliminated from the normal flow and is rendered with an offset relative to the view-port. Its position remains the same when the content of the page is scrolled using the navigation bars.


Notes
Notes
- The element is positioned when the position property is set to any value other than static
- The edges of the box corresponding to the positioned element are defined by the following properties



PropertiesDescription
top
right
bottom
left


The possible values are

PropertiesDescription
<length>
<percentage>
auto
inherit
Related Tutorial
3. display