HTML and CSS Reference
In-Depth Information
Compatibility
CSS 1, 2, 3
IE 4+ (buggy), 5+ Netscape 4+ (buggy), 6+, Firefox 1+ Opera 4+, Safari 1+
Note
• Elements may have default paddings on them, and these values may vary by user
agent. Because of this inconsistency, many developers prefer to clear all padding
values globally with a wildcard rule like * {padding: 0;} and build up individual
values.
padding-right
This property sets the distance between an element's right border and the rightmost edge of
its content.
Syntax
padding-right: length | percentage | auto | inherit
where the length is measured in any fixed measurement, such as inches ( in ) or pixels ( px ). A
percentage value is determined as a percentage of the width of the containing block. The
default value for the property is 0 .
Example
p {padding-left: 10px; padding-right: 50px;}
.flush {padding-right: 0;}
#demo {padding-right: 50%;}
Compatibility
CSS 1, 2, 3 IE 4+ (buggy), 5+
Netscape 4+ (buggy), 6+, Firefox 1+ Opera 4+, Safari 1+
Note
• Elements may have default paddings on them, and these values may vary by user
agent. Because of this inconsistency, many developers prefer to clear all padding
values globally with a wildcard rule like * {padding: 0;} and build up
individual values.
padding-top
This property sets the distance between an element's top border and the top of its content.
Syntax
padding-top: length | percentage | auto | inherit
where the length is measured in any fixed measurement, such as inches ( in ) or pixels ( px ).
A percentage value is determined as a percentage of the height of the containing block. The
default value for the property is 0 .
Search WWH ::




Custom Search