1. Home
  2. Computing & Technology
  3. Web Design / HTML

position

By Jennifer Kyrnin, About.com

position Description:

The position property defines how an element will be positioned on a page - relative to it's position in the XHTML or relative to the top left corner of the browser window.

position in CSS Versions:

position Syntax:

position: static | relative | absolute | fixed | inherit

  • static
    A normal box, subject to the normal flow.
  • relative
    Box is in normal flow, offset relative to its normal position.
  • absolute
    The box is placed in an absolute location relative to the container block.
  • fixed
    The box is placed in an absolute location relative to some reference point.
  • inherit
    The element should have the same position value as the parent element.

position Initial Value:

static

position Applies To:

All elements.

position Inheritance:

This property is not inherited.

position Browser Support:

position Media Type:

  • Visual

position Examples:

Standard position property

<p style="position:relative; top:5px;">
This paragraph is 5 pixels offset from the top of where it would normally display.
</p>

position Special Notes:

  • Be sure to test this in various browsers, as some user-agents have different effects.

More position Information

Return to the Style Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: position

©2008 About.com, a part of The New York Times Company.

All rights reserved.