inline-formatting-context-008

Inline element widths are determined by the containing block

WeasyPrint

This browser

Flags
ahem
Assertion
Inline element width is determined by the containing 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: Inline element widths are determined by the containing block</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="ahem">
 8         <meta name="assert" content="Inline element width is determined by the containing block.">
 9         <style type="text/css">
10             #div1
11             {
12                 background: red;
13                 font: 1in/1em Ahem;
14                 height: 2em;
15                 width: 2em;
16             }
17             div div
18             {
19                 color: green;
20             }
21         </style>
22     </head>
23     <body>
24         <p>Test passes if there is no red visible on the page.</p>
25         <div id="div1">
26             <div>XX XX</div>
27         </div>
28     </body>
29 </html>