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
Link to this page: If you find this page useful, we encourage you to link to this page. Simply copy and paste the code below to your website, blog, or profile.
More Tutorials: SQL PHP HTML
Copyright 2007-2009 1keydata.com All Rights Reserved. Privacy Policy
|
|