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: Width of containing block is determined by with of child</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
6 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property">
7 <meta name="flags" content="ahem">
8 <meta name="assert" content="The containing block's width depends on this element's width because the resulting layout has not been defined in CSS2.1.">
9 <style type="text/css">
10 #span1
11 {
12 background-color: red;
13 font: 1in/1em Ahem;
14 left: 10px;
15 position: absolute;
16 top: 10px;
17 }
18 p
19 {
20 margin-top: 1.1in;
21 }
22 </style>
23 </head>
24 <body>
25 <p>Test passes if there is no red visible on the page.</p>
26 <div>
27 <span id="span1">
28 <span>XX</span>
29 </span>
30 </div>
31 </body>
32 </html>