B.80. padding-bottom, padding-left, padding-right, padding-top

These properties let you set sizes of the individual padding sizes around an element. Padding is extra space added around the content of an element, but within its borders. Any background color or image assigned to an element will also fill the padding area of the element.

Inherited: No

See also: Section B.79padding

B.80.1. Value

Each value can be a CSS length (px, pt, em, etc.), a percentage of the parent element's width (even for the top and bottom paddings).

Initial value: 0

B.80.2. Compatibility

CSS Version: 1

Works in all CSS-compatible browsers, including Internet Explorer 4 and Netscape 4.

On any element with a border, Netscape 4 adds an extra 3 pixels of padding on ...

Get HTML Utopia: Designing Without Tables Using CSS 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.