Help Center

Local Navigation

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.

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.

Index


Was this information helpful? Send us your comments.