Name

padding-bottom

Values:

<length> | <percentage> | inherit

Initial value:

0

Applies to:

All elements.

Inherited:

No.

Percentages:

Refer to the width of the containing block.

Computed value:

For percentage values, as specified; for length values, the absolute length.

Note:

Padding can never be negative.

Description:

This property sets the width of the bottom padding for an element. Bottom padding set on inline nonreplaced elements does not affect line-height calculations; therefore, such an element with both bottom padding and a background may visibly extend into other lines and potentially overlap other content. Negative padding values are not permitted.

Examples:

ul {padding-bottom: 0.5in;}
h1 {padding-bottom: 2%;}

Supported by:

Firefox, Internet Explorer, Opera, Safari.

Get CSS Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.