white-space-008.xht (1401B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: white-space - pre and newlines in source</title> 8 9 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#white-space-prop" /> 10 <link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform" /> 11 <link rel="match" href="white-space-008-ref.xht" /> 12 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 13 <link rel="author" title="Bruno Fassino" href="fassino[at]gmail.com" /> 14 <meta content="Newlines in source must be preserved with 'white-space: pre'" name="assert" /> 15 16 <style type="text/css"><![CDATA[ 17 #test-overlapping-green 18 { 19 background-color: lime; 20 white-space: pre; 21 } 22 23 #reference-overlapped-red 24 { 25 background-color: red; 26 left: 0; 27 position: absolute; 28 top: 0; 29 width: 100%; 30 z-index: -1; 31 } 32 33 #relatively-positioned-wrapper 34 { 35 position: relative; 36 } 37 ]]></style> 38 39 </head> 40 41 <body> 42 43 <p>Test passes if there is a wide bright green rectangle below with one "X" in it and if there is no red.</p> 44 45 <div id="relatively-positioned-wrapper"> 46 47 <div id="test-overlapping-green"> 48 49 X</div> 50 51 <div id="reference-overlapped-red"> 52 X<br /> 53 X<br /> 54 55 X 56 </div> 57 58 </div> 59 60 </body> 61 </html>