1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5
6 <title>CSS Test: white-space</title>
7
8 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
9 <link rel="author" title="James Hopkins" href="james(a)idreamincode.co.uk">
10 <link rel="author" title="Justin Boss" href="http://www.bosspro.org/contactus/">
11 <link rel="help" href="http://www.w3.org/TR/CSS21/changes.html#q363">
12 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#white-space-model">
13 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#white-space-prop">
14 <meta name="flags" content="ahem">
15 <meta name="assert" content="'white-space: normal' and 'white-space: nowrap' should collapse sequences of white space. Regarding wrapping, line breaking opportunities are determined on the text prior to white space collapsing steps.">
16
17 <style type="text/css">
18 div#test
19 {
20 background-color: orange;
21 color: orange;
22 font: 50px/1 Ahem;
23 width: 500px;
24 white-space: normal;
25 }
26
27 span
28 {
29 white-space: nowrap;
30 }
31
32 div#control
33 {
34 background-color: blue;
35 height: 100px;
36 width: 500px;
37 }
38 </style>
39
40 </head>
41
42 <body>
43
44 <p>Test passes if the wide orange and blue rectangles are the <strong>same width</strong> and the <strong>same height</strong>.</p>
45
46 <div id="test"><span>X </span> <span>X </span> <span>X </span> <span>X </span> <span>X </span> <span>X </span> <span>X </span> <span>X </span> <span>X </span> <span>X </span></div>
47
48 <div id="control"> </div>
49
50 </body>
51 </html>