CSS2 Test Suite: 8.4 padding
[index page] [section] [Previous] [Next] [Specification]
The style declarations contained within this page:
.test {background-color: silver; margin: 0.5em 0;}
.cl1 {padding: 10px;}
.cl2 {padding: 15px;}
.cl3 {padding: 1em;}
.cl4 {padding: -2px; background-color: aqua;}
.cl5 {margin: 10px 20px 0 -5px;}
.cl6 {margin: 10px 20px 0;}
.cl7 {margin: 10px 20px;}
[test] This 'div' element has no padding applied to it, and acts as a reference point.
[test cl1] This 'div' element should have an overall padding of 10 pixels.
[test cl2] This 'div' element should have an overall padding of 15 pixels.
[test cl3] This 'div' element should have an overall padding of 1em.
[test cl4] This 'div' element should have an overall padding of zero, as negative padding values are not permitted, and an aqua background.
[test cl5] This 'div' element should have padding of 10px top, 20px right, 0 bottom, and 0 left (as negative passing values are not permitted).
[test cl6] This 'div' element should have padding of 10px top, 20px right, 0 bottom, and 20px left.
[test cl7] This 'div' element should have padding of 10px top, 20px right, 10px bottom, and 20px left.
[test] This 'div' element contains a 'span' element with a class of 'cl5' that may or may not appear to have top or bottom padding, but should have a 20px right padding and a no left padding. If there is [cl5]any increase of line separation in the 'div' element due to the top and bottom padding on the 'span' element, the test has been failed; padding does not affect the height of lines. However, the padding may extend into or overlap other lines of text.
[index page] [section] [Previous] [Next] [Specification]