1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
4 <TITLE>CSS1 Test Suite:
5.5.05 margin
</TITLE>
5 <META http-equiv=
"Content-Type" content=
"text/html; charset=iso-8859-1">
6 <META http-equiv=
"Content-Style-Type" content=
"text/css">
8 <LINK rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"../resources/base.css">
9 <STYLE type=
"text/css">
10 body {overflow: hidden;}
11 .zero {background-color: silver; margin:
0;}
12 .one {margin:
0.5in; background-color: aqua;}
13 .two {margin:
25px; background-color: aqua;}
14 .three {margin:
5em; background-color: aqua;}
15 .four {margin:
25%; background-color: aqua;}
17 .six {margin: -
10px; background-color: aqua;}
</STYLE>
21 <BODY><P>The style declarations which apply to the text below are:
</P>
22 <PRE>.zero {background-color: silver; margin:
0;}
23 .one {margin:
0.5in; background-color: aqua;}
24 .two {margin:
25px; background-color: aqua;}
25 .three {margin:
5em; background-color: aqua;}
26 .four {margin:
25%; background-color: aqua;}
28 .six {margin: -
10px; background-color: aqua;}
32 NOTE: The following tests are separated by class-zero paragraphs, so as to prevent margin-collapsing as described in section
4.1.1 of the CSS1 specification.
35 This element has a class of zero.
38 This sentence should have an overall margin of half an inch, which will require extra text in order to test.
41 This element has a class of zero.
44 This sentence should have an overall margin of
25 pixels, which will require extra text in order to test.
47 This element has a class of zero.
50 This sentence should have an overall margin of
5 em, which will require extra text in order to test.
53 This element has a class of zero.
56 This sentence should have an overall margin of
25%, which is calculated with respect to the width of the parent element. This will require extra text in order to test.
59 This element has a class of zero.
62 <LI>This list has a margin of
25px, and a light blue background.
63 <LI>Therefore, it ought to have such a margin.
64 <LI class=
"five">This list item has a margin of
25px, which should cause it to be offset in some fashion.
65 <LI>This list item has no special styles applied to it.
68 This element has a class of zero.
71 This paragraph has an overall margin of -
10px, which should make it wider than usual as well as shift it upward and pull subsequent text up toward it, and a light blue background. In all other respects, however, the element should be normal. No styles have been applied to it besides the negative margin and the background color.
74 This element has a class of zero.
78 <TABLE border
cellspacing=
"0" cellpadding=
"3" class=
"tabletest">
80 <TD colspan=
"2" bgcolor=
"silver"><STRONG>TABLE Testing Section
</STRONG></TD>
83 <TD bgcolor=
"silver"> </TD>
85 NOTE: The following tests are separated by class-zero paragraphs, so as to prevent margin-collapsing as described in section
4.1.1 of the CSS1 specification.
88 This element has a class of zero.
91 This sentence should have an overall margin of half an inch, which will require extra text in order to test.
94 This element has a class of zero.
97 This sentence should have an overall margin of
25 pixels, which will require extra text in order to test.
100 This element has a class of zero.
103 This sentence should have an overall margin of
5 em, which will require extra text in order to test.
106 This element has a class of zero.
109 This sentence should have an overall margin of
25%, which is calculated with respect to the width of the parent element. This will require extra text in order to test.
112 This element has a class of zero.
115 <LI>This list has a margin of
25px, and a light blue background.
116 <LI>Therefore, it ought to have such a margin.
117 <LI class=
"five">This list item has a margin of
25px, which should cause it to be offset in some fashion.
118 <LI>This list item has no special styles applied to it.
121 This element has a class of zero.
124 This paragraph has an overall margin of -
10px, which should make it wider than usual as well as shift it upward and pull subsequent text up toward it, and a light blue background. In all other respects, however, the element should be normal. No styles have been applied to it besides the negative margin and the background color.
127 This element has a class of zero.
129 </TD></TR></TABLE></BODY>