inline-formatting-context-019

Text-align 'justify' and 'inline-block' elements

WeasyPrint

This browser

Assertion
If 'text-align' is set to 'justify' the user agent does not stretch spaces and/or words when the 'display' property is set to 'inline-block'.

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 'justify' and 'inline-block' elements</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#inline-formatting">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="If 'text-align' is set to 'justify' the user agent does not stretch spaces and/or words when the 'display' property is set to 'inline-block'.">
 9         <style type="text/css">
10             div
11             {
12                 border: solid black;
13                 text-align: justify;
14                 width: 200px;
15             }
16             span
17             {
18                 display: inline-block;
19             }
20         </style>
21     </head>
22     <body>
23         <p>Test passes if the width of spaces and/or characters of the first line of "Filler Text" is larger than the second line of "Filler Text".</p>
24         <div>
25             Filler Text Filler Text
26             <span>Filler Text Filler Text</span>
27         </div>
28     </body>
29 </html>