top

top

CSS top Property
The CSS top property is used to offset an element's top position. It moves the element downward and the position property of the element determines behavior of the placement it gets.
CSS CODE EXAMPLE
<style type="text/css">
span.allSpans {
    background: #FFD7FF;
    border: #F0F 1px solid;
}
#mySpan {
    top: 10px;
    position: relative;
}
</style>
<span class="allSpans">my span content</span>
<span class="allSpans" id="mySpan">my span content</span>
<span class="allSpans">my span content</span>
 
my span content my span content my span content

Possible Values:

Pixel value 
Example "30px"

em unit relative value
Example: "1.5em"

Percentage value
Example: "10%"


Related Properties

bottom
right
left

0 Response to "top"

Post a Comment