CSS property: top
The top property is a positioning property that specifies the distance of the top edge of an element relative to the top edge of the containing element.
Considerations
If the position property for the element has a value of static, then the top property has no effect.
Property values
Value |
Description |
|---|---|
length |
This value specifies the distance as an absolute value. The value can be an integer with the unit of measurement. For example, “10pt” or “6px”. Negative values are permitted. Possible units include pt, px, in, cm, pc, em, or ex. |
percentage |
This value specifies the distance as a percentage of the width of the containing element. Negative values are permitted. |
auto |
This value specifies that the BlackBerry® Browser determines the position of the top edge of the element. |
inherit |
This value specifies that the element inherits the top property value from the containing element. |