
The Complete Idiot's Style Sheets Reference
| Index
| Current Category: Padding |
| Previous Style: padding-right
| Next Style: page
|
padding-top
The amount of padding on the top of the element's box.
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.
See Also:
-
padding,
padding-bottom,
padding-left,
padding-right
Possible Values:
- [length]
A specific value for the padding size.
-
Support:
-
W3C Standard | Internet Explorer | Netscape Navigator |
CSS1 and later |
4.0 and later |
4.0 and later |
- [percentage]
The position as a percentage of the current block size.
-
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-top: 25px">
This section has 25 pixels of padding on the top of the box.
</DIV>
How It Looks:
-
This section has no padding on the left, right, top, or bottom.
This section has 25 pixels of padding on the top of the box.
| Index
| Current Category: Padding |
| Previous Style: padding-right
| Next Style: page
|
|