text-align-white-space-004.xht (2013B)
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: Text-align set to 'justify' with 'white-space' set to 'nowrap'</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-06-28 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#alignment-prop" /> 8 <link rel="help" href="https://drafts.csswg.org/css-text-3/#text-align-property"/> 9 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-property"/> 10 <link rel="match" href="text-align-white-space-004-ref.xht" /> 11 12 <meta name="flags" content="ahem" /> 13 <meta name="assert" content="Setting 'text-align' to 'justify' and 'white-space' to 'nowrap', text-align is computed to 'justify'." /> 14 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 15 <style type="text/css"> 16 div 17 { 18 font: 20px/1 Ahem; 19 position: relative; 20 width: 16em; 21 } 22 div div 23 { 24 position: absolute; 25 } 26 #test 27 { 28 color: green; 29 text-align: justify; 30 white-space: nowrap; 31 } 32 .red 33 { 34 color: red; 35 } 36 .green 37 { 38 color: green; 39 } 40 </style> 41 </head> 42 <body> 43 <p>Test passes if there is <strong>no red</strong>.</p> 44 <div> 45 <div><span class="red">xxxx</span><span class="green">x</span><span class="red">xxxx</span><span class="green">x</span><span class="red">xxxx</span></div> 46 <div id="test">xxxx xxxx xxxx</div> 47 </div> 48 </body> 49 </html>