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-block elements establish a new block formatting context</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#block-formatting">
7 <meta name="flags" content="">
8 <meta name="assert" content="Elements defined as inline-blocks establish a new block formatting context.">
9 <style type="text/css">
10 #div1
11 {
12 border: solid;
13 height: 200px;
14 width: 200px;
15 }
16 div div
17 {
18 background: blue;
19 display: inline-block;
20 height: 50%;
21 width: 100%;
22 }
23 </style>
24 </head>
25 <body>
26 <p>Test passes if the upper-half of the box below is blue.</p>
27 <div id="div1">
28 <div></div>
29 </div>
30 </body>
31 </html>