The bottom property sets the vertical inset from the bottom for a positioned element. It has no effect when position is static (the default).
With absolute or fixed, it is the gap between the element’s bottom margin edge and the containing block’s bottom. With relative, a positive value moves the element up from its normal position. Pair it with top, left, and right as needed.
Baseline · Widely available.
Not deprecated. Length, percentage, and auto are widely supported. anchor() / anchor-size() values are newer and still missing in some browsers.
Give the stage a height. Percentages need a definite containing-block height.
Use absolute positioning. The box is placed against that stage.
Scale the gap.bottom: 25% is one quarter of 160px, so about 40px from the bottom.
Resize the stage. If the height changes, the offset changes with it.
Edge Cases & Pitfalls
If the box does not move, one of these is usually why.
static
Static position ignores bottom
The default is position: static. Set position to relative, absolute, fixed, or sticky first.
top
top can win over bottom
On relative, or when height is constrained, top takes precedence and bottom is ignored. Clear one of them, or leave height auto for absolute stretch.
percent
Percentages need a definite height
If the containing block’s height is auto and depends only on content, bottom: 10% may resolve like auto. Give the container an explicit height.
relative
Positive bottom moves up
For position: relative, larger bottom values raise the element. That feels opposite to absolute layout until you remember it offsets the bottom edge.
fixed
Fixed uses the viewport
With position: fixed, bottom is measured from the viewport (or a transformed ancestor), not from a normal relative parent.
Compatibility
Browser Support
bottom is a browser CSS property for positioned layout. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
bottom
Length, percentage, and auto work in all modern browsers and Internet Explorer. Anchor-based values need recent browsers.
100%Core value support
Google ChromeAll versions
Full support
Mozilla FirefoxAll versions
Full support
Apple SafariAll versions
Full support
Microsoft EdgeAll versions
Full support
OperaAll versions
Full support
Samsung InternetAll versions
Full support
Internet ExplorerAll versions · Core values
Full support
bottomWidely supported
Bottom line: Safe everywhere for auto, lengths, and percentages. Treat anchor() as progressive enhancement. It is not a runtime API.
Remember
Key Takeaways
Role: vertical inset from the bottom for positioned elements.
Needs position: ignored on static elements.
Absolute vs relative: gap from container bottom, or shift up from normal flow.
Initial value:auto. Not inherited. Percentages use containing-block height.
One line: non-static position + bottom: 20px; = offset from the bottom edge of the right containing block.
Frequently Asked Questions
It sets the vertical inset from the bottom for a positioned element. With absolute or fixed, that is the gap from the containing block’s bottom. With relative, it moves the element up from its normal spot.
The initial value is auto. The browser then uses normal layout or the top property to decide the vertical position.
No. bottom only affects elements with position relative, absolute, fixed, or sticky. On static elements it has no effect.
bottom measures from the bottom edge. top measures from the top. If both are set on a relative element, or when height is constrained, top usually wins and bottom is ignored.
Percentages refer to the containing block’s height. Use them when the offset should scale with the container, such as bottom: 10%.
Length, percentage, and auto are Baseline Widely available and work in all modern browsers and Internet Explorer. Newer anchor() values need recent browsers. It is a browser CSS property, not a Node.js feature.