Set the bottom position of a <button> element:
The bottom property sets or returns the bottom position of a positioned element.
This property specifies the bottom position of the element including padding, scrollbar, border and margin.
Tip: A positioned element is an element with the position property set to: relative, absolute, or fixed.
Tip: To set or return the top position of a positioned element, use the top property.
The bottom property is supported in all major browsers.
Return the bottom property:
Set the bottom property:
Value | Description |
---|---|
auto | Lets the browser set the bottom position. This is default |
length | Defines the bottom position in length units. Negative values are allowed |
% | Sets the bottom position in % of the height of the parent element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | auto |
---|---|
Return Value: | A String, representing the bottom position of a positioned element |
CSS Version | CSS2 |
Set the bottom position of a <div> element:
Using negative values - Set the bottom position of a <div> element:
Return the bottom position of a <div> element:
CSS tutorial: CSS Positioning
CSS reference: bottom property