padding-bottom
Summary
The padding-bottom CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and its border. Contrary to margin-bottom values, negative values of padding-bottom are invalid.
Overview table
- Initial value
0
- Applies to
- All elements (except table-*-group, table-row and table-column, br)
- Inherited
- No
- Media
- visual
- Computed value
- the percentage as specified or the absolute length
- Animatable
- Yes
- Percentages
- [[CSS percentages::refer to width of closest block-level ancestor]]
Syntax
padding-bottom: length
padding-bottom: percentage
Values
- length
- Specifies a positive fixed distance. See length for details.
- percentage
- Calculated using the dimensions of the containing block or element.
Examples
The following examples use the padding-bottom
property to change the padding of the elements.
td { padding-bottom: 20%; }
td { padding-bottom: 30px; }
Related specifications
- CSS basic box model
- W3C Working Draft
- CSS 2.1, 8 Box model
- W3C Recommendation