|
The bottom property specifies the distance from the bottom of the element to the default location of the element (when position=relative) or the distance between the bottom of the element to the bottom of the container (position=absolute). This can be specified as a percentage, as a length, or 'auto'.
Let's take a look the following example:
CSS Code
|
div {
background-color:#FF00FF;
width:250px;
height:60px;
}
p {
}
|
The HTML code,
<div>
<p>No bottom property.
</div>
|
renders
|
|
div {
background-color:#FF00FF;
width:250px;
height:60px;
}
p {
position:relative;
bottom:5px;
}
|
<div>
<p>Apply bottom:5px.
</div>
|
|
In the above example, applying the {position:relative; bottom:5px;} style moved the text up by 5px.
Next: CSS Left
Copyright © 2013 1keydata.com All Rights Reserved Privacy Policy
|