Properties
CSS
top
The top property specifies how far a box's top margin edge is offset below the top edge of the box's containing block.
CSS2
top: <length> | <percentage> | auto | inherit
| Initial: | auto |
| Applies To: | positioned elements |
| Inherited: | no |
| Percentages: | refer to height of containing block |
| Media: | visual |
Values
top: value;
| Value: | Description: |
| auto | Depends on the values of other properties |
| inherit | Takes the same computed value as the property for the element's parent |
| length | Fixed distance from the reference edge |
| percentage | Percentage of the containing block's height |
DOM
[window.]document.getElementById("element-id").style.top = "top";
