content-white-space-001.xht (1375B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Content property and white-space: pre-line</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content" /> 7 <link rel="match" href="content-white-space-001-ref.html" /> 8 <meta name="assert" content="'white-space: pre-line' applies to generated string content." /> 9 <style type="text/css"> 10 #reference, #test 11 { 12 width: 25em; 13 } 14 #reference 15 { 16 border: solid green; 17 } 18 #test 19 { 20 border: solid blue; 21 } 22 #test:before 23 { 24 content: "This text\A should be on two lines."; 25 white-space: pre-line; 26 } 27 </style> 28 </head> 29 <body> 30 <p>Test passes if the text in the green box and the blue box have the same spacing between words and the lines wrap at the same point.</p> 31 <div id="reference">This text<br />should be on two lines.</div> 32 <div id="test"></div> 33 </body> 34 </html>