CKTIS / CSS
padding-bottom — bottom padding
The padding-bottom property sets the internal spacing at an element’s physical bottom edge. It accepts a nonnegative length or percentage; in horizontal writing mode, percentages refer to the containing block’s width, not its height.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
padding-bottom: <length-percentage [0,∞]>;padding-bottom sets the thickness of the padding between the bottom edge of the content area and the bottom border. This is internal spacing, not an external margin. The property targets the physical bottom of the box; it does not switch sides with the writing direction.
The value can be a nonnegative length, such as 16px, or a percentage, such as 10%. The initial value is 0; the property is not inherited. Negative values and auto are invalid. Percentages refer to the containing block’s logical width: in horizontal-tb, this is its width, not its height or the element’s own width.
The padding shorthand sets all four sides, so it can override padding-bottom if it wins the cascade. In the example, the padding-bottom declaration follows padding: 0. Ten percent of 200px gives 20px of bottom padding; together with a 20px content height and no border, this produces a total height of 40px.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>padding-bottom</title>
<style>
.container {
width: 200px;
writing-mode: horizontal-tb;
}
.box {
box-sizing: content-box;
height: 20px;
padding: 0;
padding-bottom: 10%;
border: 0;
background: lightblue;
}
</style>
<div class="container">
<div class="box"></div>
</div>
</html>Result
padding-bottom: 20px; content height: 20px; border-box height: 40px.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.