CSS Property: padding
[this page | pdf | back links]
The CSS (CSS1) padding property is a shorthand
property combining the 4 padding sub-properties. The individual padding widths
can be set separately using padding-bottom,
padding-left,
padding-right
and padding-top.
As with some other aggregate edge properties, up to four parameter values can
be supplied (and if more than one is supplied then the properties are applied
to individual borders as described here).
Valid property values
(other than inherit
and initial) are
defined by the elements of the shorthand. Shorthand elements included in the margin
property are:
|
Value
|
Description
|
|
length
|
Any specified padding
size as a CSS length
|
|
%
|
Padding size specified
as percentage of width of container
|
|
Default Value:
|
0
|
|
JavaScript syntax:
|
e.g. object.style.padding="20px 30px"
|
|
Inherited:
|
No
|
|
Animatable:
|
See individual properties
|
NAVIGATION LINKS
Contents | Prev | Next | CSS Properties