1. Technology



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:


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.

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

©2014 About.com. All rights reserved.