summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/css1/c412-blockw-000.xht
blob: 2fd1b32120f730033915d3c409206bdd77dc02c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>CSS Test: Horizontal Formatting</title>
  <meta name="flags" content="ahem image" />
  <link rel="help" href="http://www.w3.org/TR/REC-CSS1#horizontal-formatting"/>
  <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html"/>
  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
  <link rel="match" href="c412-blockw-000-ref.xht" />

  <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
  <style type="text/css"><![CDATA[
   .test { font: 10px/1 Ahem; margin: 1em; border: solid 1em; width: 100px; background: red no-repeat; color: green; }
   .test p, .test div { margin-top: 0; margin-bottom: 0; }
   .test.a { background-image: url(support/css1test412b-a.png); }
   .test.b { background-image: url(support/css1test412b-b.png); }
   .test.b p { background-color: green; }
   p.one {margin-left: 10px;}
   div.two {margin-left: 10px;}
   p.three {margin-left: 0; width: 50%; margin-right: auto;}
   p.four {margin-left: auto; width: 50%; margin-right: auto;}
   p.five {margin-left: auto; width: 50%; margin-right: 0;}
   p.six {margin-left: auto; width: auto; margin-right: 0;}
   p.seven {margin-left: 0; width: auto; margin-right: auto;}
   p.eight {margin-left: auto; width: auto; margin-right: auto;}
   p.nine {padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; width: 50%;}
   p.ten {margin-left: auto; width: 100%; margin-right: auto;}
  ]]></style>
  <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"/>
  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property" title="10.2 Content width: the 'width' property"/>
  <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'"/>
 </head>
 <body>
  <p>Test passes if there are 2 identical filled green squares and <strong>no red</strong>.</p>
  <div class="test a"> <!-- this tests the text alignment -->
   <p class="one"> X </p>
   <div class="two">
    <p class="one"> X </p>
   </div>
   <p class="three"> X </p>
   <p class="four"> X </p>
   <p class="five"> X </p>
   <p class="six"> X </p>
   <p class="seven"> X </p>
   <p class="eight"> X </p>
   <p class="nine"> X </p>
   <p class="ten"> X </p>
  </div>
  <div class="test b"> <!-- this tests the size of the content area -->
   <p class="one"> X </p>
   <div class="two">
    <p class="one"> X </p>
   </div>
   <p class="three"> X </p>
   <p class="four"> X </p>
   <p class="five"> X </p>
   <p class="six"> X </p>
   <p class="seven"> X </p>
   <p class="eight"> X </p>
   <p class="nine"> X </p>
   <p class="ten"> X </p>
  </div>
 </body>
</html>