1
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN">
4 <title>CSS
2.1 Test Suite: Horizontal Formatting
</title>
5 <script src=
"../resources/ahem.js"></script>
6 <style type=
"text/css">
7 .test { font: 10px/1 Ahem
; margin: 1em; border: solid
1em; width: 100px; background: red no-repeat
; color: green
; }
8 .test p, .test div { margin-top: 0; margin-bottom: 0; }
9 .test.a { background-image: url
(support
/css1test412b-a
.png
); }
10 .test.b { background-image: url
(support
/css1test412b-b
.png
); }
11 .test.b p { background-color: green
; }
12 p
.one
{margin-left: 10px;}
13 div
.two
{margin-left: 10px;}
14 p
.three
{margin-left: 0; width: 50%; margin-right: auto
;}
15 p
.four
{margin-left: auto
; width: 50%; margin-right: auto
;}
16 p
.five
{margin-left: auto
; width: 50%; margin-right: 0;}
17 p
.six
{margin-left: auto
; width: auto
; margin-right: 0;}
18 p
.seven
{margin-left: 0; width: auto
; margin-right: auto
;}
19 p
.eight
{margin-left: auto
; width: auto
; margin-right: auto
;}
20 p
.nine
{padding-left: auto
; padding-right: auto
; margin-left: 0; margin-right: 0; width: 50%;}
21 p
.ten
{margin-left: auto
; width: 100%; margin-right: auto
;}
23 <link rel=
"help" href=
"http://www.w3.org/TR/CSS21/visudet.html#blockwidth" title=
"10.3.3 Block-level, non-replaced elements in normal flow">
24 <link rel=
"help" href=
"http://www.w3.org/TR/CSS21/box.html#margin-properties" title=
"8.3 Margin properties: 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', and 'margin'">
27 <p>There should be no red below, just two green squares.
</p>
28 <div class=
"test a"> <!-- this tests the text alignment -->
29 <p class=
"one"> X
</p>
31 <p class=
"one"> X
</p>
33 <p class=
"three"> X
</p>
34 <p class=
"four"> X
</p>
35 <p class=
"five"> X
</p>
36 <p class=
"six"> X
</p>
37 <p class=
"seven"> X
</p>
38 <p class=
"eight"> X
</p>
39 <p class=
"nine"> X
</p>
40 <p class=
"ten"> X
</p>
42 <div class=
"test b"> <!-- this tests the size of the content area -->
43 <p class=
"one"> X
</p>
45 <p class=
"one"> X
</p>
47 <p class=
"three"> X
</p>
48 <p class=
"four"> X
</p>
49 <p class=
"five"> X
</p>
50 <p class=
"six"> X
</p>
51 <p class=
"seven"> X
</p>
52 <p class=
"eight"> X
</p>
53 <p class=
"nine"> X
</p>
54 <p class=
"ten"> X
</p>