ap | 9cd074c | 2006-01-05 20:48:53 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
thatcher | ffd46e0 | 2005-10-25 00:42:22 +0000 | [diff] [blame] | 2 | <html> |
| 3 | <head> |
| 4 | <title>CSS 2.1 Test Suite: Floating Elements</title> |
| 5 | <style type="text/css"> |
| 6 | p { color: navy; } |
| 7 | .control { padding: 1em; } |
| 8 | .control div { width: 10em; background: navy; color: yellow; } |
| 9 | .control div.right { margin-left: 5em; text-align: right; } |
| 10 | .test { width: 15em; margin: 1em; } |
| 11 | .test div { margin: 0; padding: 0; background: red; } |
| 12 | .test p { margin: 0; padding: 0; width: 10em; background: navy; color: yellow; } |
| 13 | .test p.left { float: left; text-align: left; } |
| 14 | .test p.right { float: right; text-align: right; } |
| 15 | </style> |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 16 | <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" title="9.5 Floats"> |
| 17 | <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#alignment-prop" title="16.2 Alignment: the 'text-align' property"> |
thatcher | ffd46e0 | 2005-10-25 00:42:22 +0000 | [diff] [blame] | 18 | </head> |
| 19 | <body> |
| 20 | <p>The two patterns below should be identical, with no red present.</p> |
| 21 | <div class="control"> |
ap | 3a97bb9 | 2007-01-07 11:26:35 +0000 | [diff] [blame] | 22 | <div class="left"> * </div> |
| 23 | <div class="right"> * </div> |
thatcher | ffd46e0 | 2005-10-25 00:42:22 +0000 | [diff] [blame] | 24 | </div> |
| 25 | <div class="test"> |
| 26 | <div> |
ap | 3a97bb9 | 2007-01-07 11:26:35 +0000 | [diff] [blame] | 27 | <p class="left"> * </p> |
| 28 | <p class="right"> * </p> |
thatcher | ffd46e0 | 2005-10-25 00:42:22 +0000 | [diff] [blame] | 29 | </div> |
| 30 | </div> |
| 31 | </body> |
| 32 | </html> |