# Property Description

For absolutely positioned elements, the top property sets the top edge of an element to a unit above/below the top edge of its containing element.

For relatively positioned elements, the top property sets the top edge of an element to a unit above/below its normal position.

Note: This property has no effect when the `position` is set to `static`.

# Property Values

Value | Description
--- | ---
auto | (default) Browser calculates the top edge position
length | Sets the top edge position in px, cm, etc. This value can be negative
% | Sets the top edge position in % of containing element. This value can be negative
inherit1 | Specifies that the value of the property should be inherited from the parent element

# Examples

This example sets the top edge of the image element to 10px below the top edge of its containing element.

    img {
      position:absolute;
      top:10px;
    }

# Browser Support

Firefox | IE | Chrome | Opera | Safari

1 - 'inherit' not supported by IE

# Miscellaneous Information

Inherited: | No
Defined In: | CSS2