CKTIS / CSS
bottom — bottom inset of a positioned element
The bottom property specifies a physical bottom inset. Its effect depends on position; it has no effect with position: static.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
bottom: auto | <length-percentage>;
For absolutely positioned boxes (including those with position: fixed), the <length-percentage> value may use anchor() or anchor-size(), subject to the CSS Anchor Positioning rules.bottom accepts auto or <length-percentage>, including negative values. Initially auto, it is not inherited. auto does not always mean zero.
With position: absolute or position: fixed, it specifies a bottom inset relative to the containing block. With position: relative, positive bottom moves the element upward, preserving its layout space.
With position: sticky, it constrains positioning against the nearest scrollport, within the containing block. Percentages reference the containing block’s height, or the scrollport’s height for sticky.
bottom means physical bottom, not logical block end. Setting top simultaneously requires considering the positioning scheme’s rules.
Examples
<!doctype html>
<meta charset="utf-8">
<title>bottom</title>
<style>
.container {
position: relative;
width: 240px;
height: 160px;
background: #ddd;
}
.box {
position: absolute;
bottom: 20px;
left: 20px;
width: 40px;
height: 40px;
margin: 0;
background: #1463cc;
}
</style>
<div class="container"><div class="box"></div></div>Result
container: 240 × 160 CSS px; box: 40 × 40 CSS px; box offsets within container: left = 20 CSS px, top = 100 CSS px, bottom = 20 CSS px.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.