CSS bottom Property

Set the bottom edge of the <div> element to 10px above the bottom edge of its nearest parent element with some positioning:

div.absolute {
position: absolute;
bottom: 10px;
width: 50%;
border: 3px solid #8AC007;

Try it Yourself »

Definition and Usage

The bottom property specifies the vertical position of a positioned element. This property has no effect on non-positioned elements.

  • If position: absolute; or position: fixed; – the bottom property specifies the distance between the element’s bottom edge and the bottom edge of its containing block.
  • If position: relative; – the bottom property makes the element’s bottom edge to move above/below its normal position.
  • If position: sticky; – the bottom property behaves like its position is relative when the element is inside the viewport, and like its position is fixed when it is outside.
  • If position: static; – the bottom property has no effect.
Default value: auto
Inherited: no
Animatable: yes. Read about animatable – Try it
Version: CSS2
JavaScript syntax: object.style.bottom=”10px” Try it
CSS Syntax
bottom: auto|length|initial|inherit;
Property Values
Value Description
auto Lets the browser calculate the bottom edge position. This is default
length Sets the bottom edge position in px, cm, etc. Negative values are allowed
% Sets the bottom edge position in % of containing element. Negative values are allowed
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit