transform-abspos-006.html (1364B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test (Transforms): Containing Block for Absolute Positioning (table)</title> 5 <link rel="author" title="Aryeh Gregor" href="mailto:ayg@aryeh.name"> 6 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-rendering"> 7 <meta name="assert" content='"In the HTML namespace, any value other than 8 'none' for the transform results in the creation of . . . a 9 containing block." This means absolutely positioned elements need to be 10 rooted at a transformed ancestor, just as though it had non-static 11 position. This test differs from transform-abspos-001.html in that the outer div is a 12 table, which might cause buggy rendering engines to treat it differently.'> 13 <link rel="match" href="transform-abspos-ref.html"> 14 <style> 15 body > div { 16 display: table; 17 width: 100px; 18 height: 200px; 19 transform: translate(50px, 50px); 20 background: gold; 21 } 22 body > div > div { 23 width: 200px; 24 height: 100px; 25 position: absolute; 26 left: 50px; 27 top: 100px; 28 background: navy; 29 color: gold; 30 } 31 </style> 32 </head> 33 <body> 34 <div> 35 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 36 <div> 37 0 1 2 3 4 5 6 7 8 9 38 </div> 39 </div> 40 </body> 41 </html>