inline-box-002.xht (1644B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Block boxes within inline boxes are affected by positioning</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-04-04 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level" /> 8 <link rel="match" href="inline-box-002-ref.xht" /> 9 10 <meta name="assert" content="Block boxes within inline boxes are also affected by relative positioning on the inline box." /> 11 <style type="text/css"> 12 #div1 13 { 14 background: yellow; 15 height: 2in; 16 position: relative; 17 width: 2in; 18 } 19 #div2 20 { 21 background: blue; 22 display: inline; 23 position: relative; 24 top: 2in; 25 } 26 #div3 27 { 28 background: orange; 29 width: 2in; 30 } 31 </style> 32 </head> 33 <body> 34 <p>Test passes if an orange stripe is between two shorter blue stripes and all three stripes are below a yellow square.</p> 35 <div id="div1"> 36 <div id="div2"> 37 Filler Text 38 <div id="div3">Filler Text</div> 39 Filler Text 40 </div> 41 </div> 42 </body> 43 </html>