text-align-white-space-008.xht (2135B)
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' and 'direction' set to 'rtl'</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-008-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 direction: rtl; 19 font: 20px/1 Ahem; 20 margin-left: 9em; 21 position: relative; 22 width: 16em; 23 } 24 div div 25 { 26 margin: 0; 27 position: absolute; 28 } 29 #test 30 { 31 color: green; 32 text-align: justify; 33 white-space: nowrap; 34 } 35 .red 36 { 37 color: red; 38 } 39 .green 40 { 41 color: green; 42 } 43 </style> 44 </head> 45 <body> 46 <p>Test passes if there is <strong>no red</strong>.</p> 47 <div> 48 <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> 49 <div id="test">xxxx xxxx xxxx</div> 50 </div> 51 </body> 52 </html>