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 - pre and newlines in source</title>
7
8 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#white-space-prop">
9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
10 <link rel="author" title="Bruno Fassino" href="fassino[at]gmail.com">
11 <meta content="Newlines in source must be preserved with 'white-space: pre'" name="assert">
12 <meta content="" name="flags">
13
14 <style type="text/css">
15 #test-overlapping-green
16 {
17 background-color: lime;
18 white-space: pre;
19 }
20
21 #reference-overlapped-red
22 {
23 background-color: red;
24 left: 0;
25 position: absolute;
26 top: 0;
27 width: 100%;
28 z-index: -1;
29 }
30
31 #relatively-positioned-wrapper
32 {
33 position: relative;
34 }
35 </style>
36
37 </head>
38
39 <body>
40
41 <p>Test passes if there is a wide bright green rectangle below with one "X" in it and if there is no red.</p>
42
43 <div id="relatively-positioned-wrapper">
44
45 <div id="test-overlapping-green">
46
47 X</div>
48
49 <div id="reference-overlapped-red">
50 X<br>
51 X<br>
52
53 X
54 </div>
55
56 </div>
57
58 </body>
59 </html>