text-align-white-space-004

Text-align set to 'justify' with 'white-space' set to 'nowrap'

WeasyPrint

This browser

Flags
ahem
Assertion
Setting 'text-align' to 'justify' and 'white-space' to 'nowrap', text-align is computed to 'justify'.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 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="help" href="http://www.w3.org/TR/CSS21/text.html#alignment-prop">
 7         <meta name="flags" content="ahem">
 8         <meta name="assert" content="Setting 'text-align' to 'justify' and 'white-space' to 'nowrap', text-align is computed to 'justify'.">
 9         <style type="text/css">
10             div
11             {
12                 font: 1em/1 Ahem;
13                 position: relative;
14                 width: 16em;
15             }
16             div div
17             {
18                 position: absolute;
19             }
20             #test
21             {
22                 color: green;
23                 text-align: justify;
24                 white-space: nowrap;
25             }
26             .red
27             {
28                 color: red;
29             }
30             .green
31             {
32                 color: green;
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if there is no red visible on the page.</p>
38         <div>
39             <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>
40             <div id="test">xxxx xxxx xxxx</div>
41         </div>
42     </body>
43 </html>