B.79. padding

This shorthand property sets the size of the padding surrounding the selected element(s) on all four sides with a single property declaration. 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.

The amount of padding for each side may be set individually using the padding-bottom, padding-left, padding-right, and padding-top properties.

Inherited: No

See also: Section B.80padding-bottom, Section B.80padding-left, Section B.80padding-right, Section B.80padding-top

B.79.1. Value

You can specify from one to four different values to specify different padding sizes for each side of the element, as ...

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.