white-space-processing-049

Floats and line-breaking opportunities with 'white-space'

WeasyPrint

This browser

Flags
ahem
Assertion
A line breaking opportunity is not introduced with an absolutely positioned element.

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: Floats and line-breaking opportunities with 'white-space'</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#white-space-model">
 7         <meta name="flags" content="ahem">
 8         <meta name="assert" content="A line breaking opportunity is not introduced with an absolutely positioned element.">
 9         <style type="text/css">
10             #div1
11             {
12                 color: orange;
13                 font-family: Ahem;
14                 position: relative;
15                 white-space: normal;
16                 width: 5em;
17             }
18             div div
19             {
20                 color: blue;
21                 position: absolute;
22                 right:0;
23                 top:0;
24             }
25         </style>
26     </head>
27     <body>
28         <p>Test passes if there is an orange box on the left and right of the blue box.</p>
29         <div id="div1">
30             <span>XXXXXXX</span>
31             <div>XXX</div>
32         </div>
33     </body>
34 </html>