The padding-bottom property sets inner spacing on the bottom edge of an element. Padding is the space between the content and the border, and bottom padding gives content breathing room below the text or media inside the box.
The padding-bottom property in CSS is used to set the padding area on the bottom of an element. Padding is the space between the content of the element and its border.
The padding-bottom property allows you to control the vertical spacing within an element, providing a way to create visual separation and layout consistency.
Definition and Usage
Apply padding-bottom when you need extra room below the content inside an element — for example, under a paragraph in a card, below a button in a toolbar, or at the foot of a content block before the bottom border.
Like all padding properties, padding-bottom increases the visible size of an element’s background and border box. It never collapses and always stays inside the element’s border.
💡
Beginner Tip
Use padding-bottom for inner spacing below content. Use margin-bottom when you need space outside the element, between this box and the next one.
padding-bottom → space below contentAlways the physical bottom edge
Foundation
📝 Syntax
The syntax for the padding-bottom property is simple. You can specify the padding using various units, including pixels, ems, percentages, and more.
syntax.css
element{padding-bottom:value;}
Here, value can be a length (e.g., px, em, rem), a percentage (%), or the keyword auto.
Apply padding-bottom to any element that needs extra inner space below its content.
The value is a length, percentage, or auto.
The property is not inherited — child elements do not automatically get the parent’s bottom padding.
Percentage padding is calculated relative to the width of the containing block.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
0
Applies to
Bottom padding side only
Inherited
No
Animatable
Yes, as a length
Common use
Cards, paragraphs, buttons, and any content that needs room above the bottom border
Defaults
🎯 Default Value
The default value of the padding-bottom property is 0. This means that if no value is specified, there will be no padding at the bottom of the element.
Reference
💎 Property Values
Value
Example
Description
Length
padding-bottom: 10px;
Specifies the bottom padding in fixed units such as px, em, or rem.
Percentage
padding-bottom: 5%;
Specifies the bottom padding as a percentage of the containing element’s width.
auto
padding-bottom: auto;
Allows the browser to calculate the bottom padding automatically. This value is rarely used with padding properties.
Four boxes with the same content and different pb- utility classes showing increasing bottom inner spacing:
pb-sm
pb-md
pb-lg
pb-xl
Hands-On
Examples Gallery
Start with the reference box example, try different bottom values, add spacing in stacked layouts, and compare physical bottom padding with logical block-end padding.
🔢 Basic padding-bottom
Start with the reference example — bottom padding on a div with a border and light gray background.
Example 1 — Box with Bottom Padding
In this example, we’ll add padding to the bottom of a <div> element.
padding-bottom-example.html
<style>.box{border:1px solid #000;padding-bottom:20px;background-color:lightgray;}</style><divclass="box">
This box has a padding-bottom of 20px.
</div>
The .box class applies a bottom padding of 20px, creating space between the content and the border of the div. The gray background fills the padding area so you can see the gap.
Example 2 — Different Bottom Values
Use rem units for scalable bottom spacing that grows with root font size.
Each class sets a different bottom padding while leaving the top and sides unchanged. The background fills the padding area so you can compare the spacing visually.
🛠 Layout Patterns
Apply bottom padding to cards and compare physical vs logical properties.
Example 3 — Card Footer Spacing
Add bottom padding to a card body so content does not crowd the bottom border or footer area.
Card body with extra bottom padding for comfortable reading.
How It Works
Extra padding-bottom gives the last line of text more room above the card’s bottom edge. This is a common pattern when the bottom border or footer sits close to the content.
In horizontal English layouts, both approaches look the same. padding-block-end stays correct when writing mode changes; physical bottom padding does not.
Companion
padding-bottom vs padding, padding-block-end & margin-bottom
The padding shorthand sets padding on all four sides at once. Use padding-bottom when you need spacing on only the bottom edge.
padding-block-end is the logical equivalent that follows the block axis. Use padding-bottom for simple physical layouts; prefer padding-block-end in multilingual or vertical writing-mode designs. Remember: margin-bottom adds space outside the border, not inside it.
padding-bottom-companion.css
/* Bottom only */.card-body{padding-bottom:1.25rem;}/* All four sides via shorthand */.section{padding:1rem2rem;}/* Space below the element (outside border) */.article{margin-bottom:2rem;}
A11y
♿ Accessibility
Improve readability — Paragraphs and card content benefit from bottom padding so text does not crowd the bottom border.
Touch targets — Buttons and links inside padded containers are easier to tap when bottom padding gives them room.
Do not hide content — Very large bottom padding on small screens can push important content out of view.
Keep focus visible — Padding adjusts inner spacing; it should not replace visible focus outlines on interactive elements.
Test zoomed layouts — Users who zoom in rely on comfortable padding to keep text readable.
🧠 How padding-bottom Works
1
You set a padding value
Write padding-bottom: 20px; with a length, percentage, or auto.
CSS rule
2
Browser adds space on the bottom
Padding is inserted between the content edge and the border on the bottom side only.
Box model
3
Background fills the padding area
The element’s background color and background image extend into the padding box, making the gap visible.
Rendering
=
▦
Comfortable bottom spacing
Content has breathing room below it without affecting spacing on other sides or outside the border.
Compatibility
Browser Compatibility
The padding-bottom property is well-supported across all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. It is a fundamental CSS property, so you can use it confidently knowing it will work consistently across different platforms.
✓ Universal · All browsers
Bottom padding works everywhere
Chrome, Firefox, Safari, Edge, Opera, and Internet Explorer all support padding-bottom as a core box-model property.
100%Universal support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Legacy & Chromium
Full support
OperaAll versions
Full support
padding-bottom property100% supported
Bottom line:padding-bottom is one of the most reliable CSS properties. Safe to use in any project without fallbacks.
Wrap Up
Conclusion
The padding-bottom property is a crucial tool in CSS for managing the layout and spacing of elements.
By controlling the padding, you can create a clean and visually appealing design, ensuring that elements are appropriately spaced. Whether you’re designing a complex web application or a simple webpage, understanding how to use padding properties effectively is essential.
Use padding-bottom for inner spacing below content
Prefer rem or em for scalable bottom spacing
Pair with padding-top for asymmetric vertical rhythm
Use the padding shorthand when all sides need spacing
Test on mobile to ensure bottom padding does not waste screen space
❌ Don’t
Confuse padding-bottom with margin-bottom for outer spacing
Use excessive bottom padding that pushes content off small screens
Forget that percentage padding is based on width, not height
Assume auto is useful for padding (it rarely is)
Use physical bottom padding when writing-mode-aware layouts need padding-block-end
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about padding-bottom
Use these points when spacing content on the bottom edge.
5
Core concepts
↓01
Bottom Only
One physical edge.
Purpose
002
Default 0
No spacing.
Default
▦03
Inside Border
Part of box model.
Scope
%04
Units
px, em, rem, %, auto.
Values
pbe05
Not block-end
Physical vs logical.
Companion
❓ Frequently Asked Questions
The padding-bottom property sets inner spacing on the bottom edge of an element, between the content and the bottom border. It creates vertical room below the content inside the element.
The default value is 0, meaning no bottom inner spacing is applied unless you set padding-bottom explicitly.
padding-bottom adds space inside the element, between the content and the border. margin-bottom adds space outside the border, between this element and the element below it.
padding-bottom always targets the physical bottom edge. padding-block-end follows the block axis and stays correct when the writing mode changes, such as in vertical text layouts.
Yes. Percentage padding is calculated relative to the width of the containing block, even for bottom padding.