CSS GUIDE PADDING TOP

From CDOT Wiki
Revision as of 03:34, 12 December 2006 by Sherman (talk | contribs) (Specification Conformance)
Jump to: navigation, search

Summary

This property sets the top padding of an given element.

  • Inherited: No

Syntax

TARGET_ELEMENT {padding-top: value;}

Legal Values

  • length - entered in pixels (px), centimetres (cm) or inches (in)
  •  % - entered as a percentage corresponding to the height of closest element.

Mozilla Recommended Values

Usage Examples

h2 {padding-top: 10px;}
Sets the top padding to be 10 pixels
h1 {padding-top: 10%;}
Sets the top padding to be 10% the height of the closest element.

Notes

Negative values are not allowed.

Specification Conformance

CSS 1
CSS 2.1
CSS 3

Browser Compatibility

See Also