| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
| <html> |
| <head> |
| <title>CSS 2.1 Test Suite: Horizontal Formatting</title> |
| <style type="text/css"> |
| .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: auto; padding-right: auto; 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/box.html#margin-properties" title="8.3 Margin properties: 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', and 'margin'"> |
| </head> |
| <body> |
| <p>There should be no red below, just two green squares.</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> |