March 2004
Intermediate to advanced
528 pages
16h 33m
English
padding
This shorthand property sets the width of the overall padding for an element or sets the widths of each individual side padding. Padding set on inline nonreplaced elements does not affect line-height calculations; therefore, such an element with both padding and a background may visibly extend into other lines and potentially overlap other content. The background of the element will extend throughout the padding. Negative padding values are not permitted.
[ <length> | <percentage> ]{1,4} |
inherit
not defined for shorthand elements
all elements
no
refer to the width of the containing block
see individual properties (padding-top, etc.)
padding can never be negative