CSS property: padding
Availability
|
BlackBerry®
Device Software version 4.3 or later
|
Usage
|
All elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group, and table-column
|
Inherited
|
No
|
Default value
|
—
|
The padding property is a shorthand property used to specify the padding applied around all sides of an element.
Property values
Value
|
Description
|
[ padding-top| padding-right | padding-bottom | padding-left ]
|
This value is a whitespace-separated list of values for the padding-top, padding-right, padding-bottom, and padding-left properties.
You can specify one to four values:
One value: All four sides will have the specified padding.
Two values: The first value specifies the padding applied to the top and bottom; the second to the right and left.
Three values: The first value specifies the padding applied the top; the second to the right and left; and the third to the bottom.
Four values: The first value specifies the padding applied to the top; the second to the right; the third to the bottom; and the fourth to the left.
See the descriptions of the individual properties for more information about valid values.
|
inherit
|
This value specifies that the element inherits the padding property value from the containing element.
|
Index
Was this information helpful? Send us your comments.