CSS bottom Property
CSS bottom Property
The bottom property is used to specify the vertical position of a positioned element. It does not work on non-positioned elements.
For your Information:-
If position is absolute or fixed then the bottom property sets the bottom edge of an element to a unit above/below the bottom edge of its nearest positioned ancestor.
If the position is relative, the bottom property makes the element bottom edge move above/below its normal position.
If the position is sticky then 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 the position is static then the bottom property has no effect.
Default Value:-
It has a default value of the auto.
Syntax:-
Its syntax is:- bottom: auto | length | initial | inherit;
Further Explanation:-
Value | Description |
---|---|
auto | Lets the browser calculate the bottom edge position. |
length | Sets the bottom edge position in px, cm, etc. |
% | Sets the bottom edge position in % of containing element. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |