HTML and CSS Reference
In-Depth Information
Name
padding-top
Values:
<length> | <percentage>
Initial value:
0
Applies to:
All elements
Inherited:
No
Percentages:
Refer to the width of the containing block
Computed value:
For percentage values, as declared; for length values, the absolute length
Description:
Defines the width of the top padding for an element. Top padding set on inline nonreplaced
elements does not affect line-height calculations; therefore, such an element with both top
padding and a background may visibly extend into other lines and potentially overlap other
content. Negative padding values are not permitted.
Examples:
ul {padding-top: 0.5in;}
h3 {padding-top: 1.5em;}
Search WWH ::




Custom Search