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.
Example "30px"
em unit relative value
Example: "1.5em"
Percentage value
Example: "10%"
right
left
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>
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 valueExample "30px"
em unit relative value
Example: "1.5em"
Percentage value
Example: "10%"
Related Properties
bottomright
left
0 Response to "top"
Post a Comment