CSS padding-bottom Property
Description
The padding-bottom
property of an element sets the padding space required on the bottom side of an element. The padding area is the space between the content of the element and it's border. A negative value is not allowed.
- Initial value
- 0
- Applies to
- All elements
- Inherited
- No
- Media
- Visual
- Computed value
- <length> - the percentage as specified or the absolute length
- Animatable
- Yes
- CSS Version
- CSS1, CSS2, CSS3
- JavaScript syntax
- object.style.paddingBottom
Syntax
padding-bottom: [ <length> | <percentage> ]
Values
- <length>Specifies a positive fixed width.
- <percentage>A percentage with respect to the width of the containing block.
- inherit
Example
<div class="layer">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
.layer {
background: #fc3;
border-top: 5px solid #000;
border-bottom: 5px solid #000;
padding: 5px;
padding-bottom: 40px;
}
Give it a Try
Click the button below to experiment with this property.
Browser Support
Desktop | |||||
4 | 12 | 1 | 1 | 3.5 | 1 |
Tablets / Mobile | |||||
![]() |
|||||
≤37 | 18 | 4 | 14 | 1 | 1.0 |
Last updated by CSSPortal on: 3rd November 2019