top | WebReference

top

Name: top

Description: Specifies the distance from the element's top outer margin to the top edge of the content block

Browser Compatibility: IE 4+ / NN 4+

Browser Compatibility: IE 4+ / NN 4+ / O 4+

Inherited: No

Values:

Code Example:

h1 {
   display: block;
   position: absolute;
   top: 50px; right: 100px; bottom: 50px; left: 100px;
}

Comments: Applies to positioned elements.