CSS bottomProperty
Example
Set the bottom margin of the image, 5px above the element's bottom edge:
{
position:absolute;
bottom:5px;
}
Try it Yourself »
Property definition and usage instructions
For absolutely positioned elements, the bottom property sets the bottom edge of the element a specified amount above/below the bottom edge of its containing element.
For relatively positioned elements, the bottom property sets the bottom edge of the element a specified amount above/below its normal position.
Note:If "position: static", the bottom property has no effect.
Description:For static elements, it is auto; for length values, it is the corresponding absolute length; for percentage values, it is the specified value; otherwise, it is auto. For relatively positioned elements, if both bottom and top are auto, their computed values are both 0; if one of them is auto, it takes the negative of the other value; if neither is auto, bottom takes the negative of the top value.
| Default value: | auto |
|---|---|
| Inheritance: | no |
| version: | CSS2 |
| JavaScript Syntax: | object.style.bottom="50px" |
Browser Support
The numbers in the table indicate the first browser version that supports the property.
| Property | |||||
|---|---|---|---|---|---|
| bottom | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
Property value
| Value | Description |
|---|---|
| auto | Default value. The browser calculates the position of the bottom. |
| % | Sets the bottom edge position as a percentage of the containing element. Negative values are allowed. |
| length | Sets the bottom edge position using units such as px, cm. Negative values are allowed. |
| inherit | Specifies that the value of the bottom property should be inherited from the parent element. |
Related Articles
CSS Tutorial:CSS Positioning
other extensions