CSS1 Test Suite: 4.1.1 Vertical Formatting


[Previous] [Next] [Section] [Contents] [Specification]

The style declarations which apply to the text below are:

P.one {margin-bottom: 2cm; padding-bottom: 0;}
P.two {margin-top: 2cm; padding-top: 0;}
P.three {margin-top: 0; padding-top: 0;}
P.four {margin-top: -1cm; margin-bottom: 0;
        padding-top: 0; padding-bottom: 0;}
DIV.five {margin-top: 1cm; margin-bottom: 1cm;
          padding-top: 1cm; padding-bottom: 0;}
P.six {margin-top: 1cm; margin-bottom: 1cm;
       padding-top: 0; padding-bottom: 0;}
P.seven {margin-top: 1cm; padding-top: 0;}
P.eight {margin-bottom: -1cm; padding-bottom: 2cm;}
P.nine {margin-top: -1cm; padding-top: 1cm;
        padding-bottom: 0; margin-bottom: 1cm;}
P.ten {margin-top: 1cm;padding-top: 0;
       float: left;width: 50%;}
P.eleven {margin-top: 1cm; padding-top: 0; clear: none;}
P.twelve {margin-bottom: 0; padding-bottom: 1cm; clear: both;}
P.thirteen {margin-top: 0; padding-top: 1cm;}
TABLE {clear: both;}


There should be a two-centimeter margin between this paragraph and the next, because adjacent vertical margins should collapse to the maximum of the margins.

This is another paragraph.

There should be a two-centimeter margin between this paragraph and the next.

This is another paragraph.

There should be a one-centimeter margin between this paragraph and the next, because when there is one negative margin, the two margins should be added (the minus sign should be kept).

This is another paragraph.

There should be three centimeters between this text and the text above, but only one centimeter between this text and the text below, because vertical margins of nested elements should collapse only if there is no border or padding between the margins.

This is more text.

There should be two centimeters between this paragraph and the one below, because negative margins collapse to a negative margin with the largest absolute value of the margins collapsed.

This is a paragraph, which I should make very long so that you can easily see how much space there is between it and the one below it and to the right.

There should be two centimeters between this paragraph and the one above it, since margins do not collapse on floating elements.

There should be one centimeter between this paragraph and the (non-floating) one above it, since the float should not effect the paragraph spacing.

There should be two centimeters of padding between this paragraph and the one below. Padding does not collapse, and there is 1cm of padding on each side.

This is the next paragraph.

TABLE Testing Section
 

There should be a two-centimeter margin between this paragraph and the next, because adjacent vertical margins should collapse to the maximum of the margins.

This is another paragraph.

There should be a two-centimeter margin between this paragraph and the next.

This is another paragraph.

There should be a one-centimeter margin between this paragraph and the next, because when there is one negative margin, the two margins should be added (the minus sign should be kept).

This is another paragraph.

There should be three centimeters between this text and the text above, but only one centimeter between this text and the text below, because vertical margins of nested elements should collapse only if there is no border or padding between the margins.

This is more text.

There should be two centimeters between this paragraph and the one below, because negative margins collapse to a negative margin with the largest absolute value of the margins collapsed.

This is a paragraph, which I should make very long so that you can easily see how much space there is between it and the one below it and to the right.

There should be two centimeters between this paragraph and the one above it, since margins do not collapse on floating elements.

There should be one centimeter between this paragraph and the (non-floating) one above it, since the float should not effect the paragraph spacing.

There should be two centimeters of padding between this paragraph and the one below. Padding does not collapse, and there is 1cm of padding on each side.

This is the next paragraph.


[Previous] [Next] [Section] [Contents] [Specification]