abspos-inline-007.xht (1826B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Absolutely positioned descendants in inlines</title> 5 <link rel="author" title="Aleks Totic" href="mailto:atotic@chromium.org"/> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" /> 7 <link rel="match" href="abspos-inline-007-ref.xht" /> 8 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 9 <style type="text/css"> 10 .block-container { 11 position: relative; 12 font: 20px Ahem; 13 } 14 .inline-container { 15 position: relative; 16 border: 1px solid black; 17 } 18 .parent-block { 19 display: inline-block; 20 width: 30px; 21 height: 10px; 22 } 23 .abspos { 24 position: absolute; 25 width: 10px; 26 height: 10px; 27 background-color: green; 28 } 29 .br { 30 right: 0; 31 bottom: 0; 32 } 33 .tl { 34 top: 0; 35 left: 0; 36 } 37 .filler { 38 display: inline-block; 39 width: 30px; 40 height: 10px; 41 } 42 43 </style> 44 </head> 45 <body> 46 <div class="block-container"> 47 x 48 <span class="inline-container"> 49 tl 50 <div class="parent-block"> 51 <div class="abspos tl"></div> 52 </div> 53 <div class="filler"></div> 54 </span> 55 x 56 <span class="inline-container"> 57 br 58 <div class="parent-block"> 59 <div class="abspos br"></div> 60 </div> 61 <div class="filler"></div> 62 </span> 63 x 64 <span class="inline-container"> 65 static 66 <div class="parent-block"> 67 <div class="abspos"></div> 68 </div> 69 <div class="filler"></div> 70 </span> 71 </div> 72 <p>Tests abspos positioning of an Element that 1) has an inline containing 73 block, and 2) is not a child of the inline containing block, but a descendant.</p> 74 </body> 75 </html>