CSS padding-bottom Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The padding-bottom property sets the inner padding on the physical bottom edge of an element — the space between the content and the bottom border.

It is a longhand of the padding shorthand. Unlike padding-block-end, it always means bottom, even if writing-mode changes. It is not inherited. The initial value is 0. Negative values are invalid.

Baseline · Widely available.

Not deprecated. Supported in all modern browsers and Internet Explorer. Safe for everyday layouts.

Physical tip.

Use padding-bottom when you mean a fixed screen edge. Prefer padding-block-end when spacing should follow writing mode.

CSS Syntax

syntax.css
padding-bottom: <length> | <percentage> | initial | inherit;

One non-negative length or percentage. There is no auto (unlike margin-bottom).

Property Values

ValueDescriptionTry it
<length>Fixed size such as 1.5rem or 24pxTry it
<percentage>Percent of the containing block widthTry it
Always bottomStays on the physical bottom even with vertical writing modeTry it
Absolute lengthPixel value such as 24pxTry it
initialResets to 0Try it
inheritInherits from the parent elementTry it

How to Use padding-bottom

Add room below the content, inside the border.

  1. Decide how much space you need between the content and the bottom border.
  2. Set padding-bottom with a non-negative length or percentage.
  3. Use padding-top or the padding shorthand if other sides need padding too.
  4. Choose padding-block-end instead if the layout may switch writing mode.

Live Preview

The amber area is padding. Change padding-bottom — only the bottom edge grows.

Amber = bottom padding. White dashed = content. Other sides stay at 0 here.

Box
Content

padding-bottom: 0

CSS Examples

Each snippet focuses on padding-bottom. Use Try It Yourself for a live editor.

Example 1 — Length Value

A single length adds inner space on the bottom edge only.

CSS
<style>
  .box {
    padding-bottom: 1.5rem;
    border: 1px solid #ccc;
  }
</style>

<div class="box">Padded content</div>
Try It Yourself

How It Works

  1. One side only. 1.5rem applies to the bottom, not the top.
  2. Inside the border. The amber gap sits between content and border.
  3. Other sides untouched. Top and left/right paddings stay at their own values.
  4. Not margin. This does not push neighboring elements away outside the box.

Example 2 — Percentage Value

Percentages resolve against the containing block width, even for bottom padding.

CSS
<style>
  .wrap { width: 280px; }
  .box {
    padding-bottom: 5%;
    border: 1px solid #ccc;
  }
</style>

<div class="wrap">
  <div class="box">5% bottom padding</div>
</div>
Try It Yourself

How It Works

  1. Reference width. 5% uses the containing block’s width, not its height.
  2. Still bottom. The padding is added on the physical bottom edge.
  3. Scales with container. Wider parents produce larger bottom padding.
  4. Must be non-negative. Negative percentages are invalid.

Example 3 — Always Physical Bottom

Even with vertical writing mode, padding-bottom still pads the bottom edge.

CSS
<style>
  .box {
    writing-mode: vertical-rl;
    padding-bottom: 1.5rem;
    border: 1px solid #ccc;
  }
</style>

<div class="box">Vertical text</div>
Try It Yourself

How It Works

  1. Text turns vertical. writing-mode: vertical-rl changes the text flow.
  2. Padding stays bottom. padding-bottom still targets the physical bottom.
  3. Logical alternative. padding-block-end would follow the block axis instead.
  4. When to use which. Pick physical for fixed edges; logical for multilingual layouts.

Edge Cases & Pitfalls

Most confusion comes from mixing padding with margin, or expecting percentages to use height.

percent

% uses width, not height

padding-bottom: 10% is 10% of the containing block’s width. That surprise trips up many beginners.

margin

Not the same as margin-bottom

Padding is inside the border and does not collapse. Margin is outside and can collapse with adjacent vertical margins.

negative

Negative padding is invalid

Unlike some margin values, negative padding is not allowed. The declaration is ignored.

logical

Does not follow writing mode

For spacing that should stay “after” the content in any writing mode, use padding-block-end.

box

box-sizing changes the total size

With box-sizing: border-box, bottom padding is included in the element’s declared height.

Browser Support

padding-bottom is a browser CSS property for the box model. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

padding-bottom

Supported in all modern browsers and Internet Explorer for many years. Part of the CSS Box Model.

99% Box model support
Google Chrome 1+
Full support
Mozilla Firefox 1+
Full support
Apple Safari 1+
Full support
Microsoft Edge 12+
Full support
Opera 3.5+
Full support
Samsung Internet 1+
Full support
Internet Explorer 4+
Full support
padding-bottom Widely supported

Bottom line: Safe for every layout. Logical longhands like padding-block-end are newer; classic padding-bottom is universal. It is not a runtime API.

Key Takeaways

  • Role: physical bottom inner spacing between content and border.
  • Always bottom: writing mode does not remap this side.
  • Percent rule: percentages use containing-block width, not height.
  • Limits: no auto, no negatives; use logical longhands when writing mode may change.

One line: padding-bottom adds non-negative inner space on the physical bottom edge.

Frequently Asked Questions

It sets inner spacing on the physical bottom edge, between the content and the bottom border.
The default is 0, so there is no bottom padding until you set one.
padding-bottom is inside the border. margin-bottom is outside the border and can collapse with neighboring vertical margins.
padding-bottom always means the physical bottom. padding-block-end follows writing mode and may map to another side in vertical text.
Yes. Percentages resolve against the containing block width, even for bottom padding. Negative values are invalid.
It is Baseline and supported in all modern browsers and Internet Explorer. It is a browser CSS property, not a Node.js feature.

Next: padding-inline

Learn the logical shorthand for inline-start and inline-end padding.

padding-inline tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful