CSS bottom Property
Description
The bottom property controls how an element is offset vertically from the bottom edge of the box it is positioned against. It only has an effect when an element participates in a positioning scheme other than the normal static flow - specifically when its position is set to a value that establishes a positioned box. Conceptually, it tells the browser where the element’s box should sit relative to the bottom border of its containing block rather than where it would normally appear in the document flow.
How that offset is applied depends on the element’s positioning mode. For elements shifted with relative positioning, the bottom offset moves the element visually but does not change the original space the element occupies in the flow. For absolutely or fixed positioned elements the element is taken out of normal flow and the offset anchors the element to the containing block’s bottom edge. For elements using a sticky positioning model, the bottom offset is part of the rules that determine when the element becomes "stuck" during scrolling and how it is pinned relative to the viewport or scrolling container.
The bottom property interacts with the complementary directional properties such as top, left and right. Specifying opposing offsets can change whether an element is simply moved or whether it becomes stretched between two edges; margins and transforms can also affect an element's final visual placement. For example, adjacent margin values still participate in layout calculations and a later transform will visually move the element after layout, so consider margin and transform when planning precise alignment.
In practical use, bottom is commonly used to anchor overlays, footers, and pinned controls to the lower edge of a container or the viewport. Because its behavior differs between positioning modes - and because absolute/fixed positioned elements no longer occupy space in normal flow - it’s important to choose the positioning strategy that matches the intended document flow and accessibility requirements rather than relying solely on offsets to arrange elements.
Definition
- Initial value
- auto
- Applies to
- Positioned elements
- Inherited
- No
- Computed value
- If specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, 'auto'
- Animatable
- Yes
- JavaScript syntax
- object.style.bottom
Interactive Demo
Syntax
bottom: auto | <length> | <percentage>
Values
- <length>Floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px).
- <percentage>Integer, followed by a percent sign (%). The value is a percentage of the height of the parent object.
- autoDefault position, according to the regular HTML layout of the page.
Example
Browser Support
The following information will show you the current browser support for the CSS bottom property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
