
The Complete Idiot's Style Sheets Reference
| Index
| Current Category: Margins |
| Previous Style: overflow-y
| Next Style: padding-bottom
|
padding
A shorthand style that enables you to set multiple padding properties at once.
Support:
-
Notes:
- The padding is the space between the element's content and its box border. It's similar to the <TABLE> tag's CELLPADDING attribute.
- This style can apply the following padding properties, in this order: padding-top, padding-right, padding-bottom, and padding-left.
- Separate each property with a space.
- If you specify just a single value, it applies to all four padding sides.
See Also:
-
padding-bottom,
padding-left,
padding-right,
padding-top
Possible Values:
- [padding-bottom]
See padding-bottom.
-
Support:
-
W3C Standard | Internet Explorer | Netscape Navigator |
CSS1 and later |
4.0 and later |
4.0 and later |
- [padding-left]
See padding-left.
-
Support:
-
W3C Standard | Internet Explorer | Netscape Navigator |
CSS1 and later |
4.0 and later |
4.0 and later |
- [padding-right]
See padding-right.
-
Support:
-
W3C Standard | Internet Explorer | Netscape Navigator |
CSS1 and later |
4.0 and later |
4.0 and later |
- [padding-top]
See padding-top.
-
Support:
-
W3C Standard | Internet Explorer | Netscape Navigator |
CSS1 and later |
4.0 and later |
4.0 and later |
Example:
<STYLE TYPE="text/css">
<!--
DIV {border: thin solid;
width: 100px}
-->
</STYLE>
<DIV>
This section has no padding on the left, right, top, or bottom.
</DIV>
<DIV STYLE="padding: 15px 25 15px 25px">
This section has 15 pixels of padding on the top and bottom of the box, and 25 pixels of padding on the lright and left sides of the box.
</DIV>
How It Looks:
-
This section has no padding on the left, right, top, or bottom.
This section has 15 pixels of padding on the top and bottom of the box, and 25 pixels of padding on the lright and left sides of the box.
| Index
| Current Category: Margins |
| Previous Style: overflow-y
| Next Style: padding-bottom
|
|