transform-abspos-007.html (1429B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test (Transforms): Containing Block for Fixed Positioning (inline-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. The object acts as a containing block for fixed 10 positioned descendants." This means fixed-position elements need to be 11 rooted at a transformed ancestor, rather than the viewport. This test 12 differs from transform-abspos-002.html in that the outer div has display: 13 inline-table, which might cause it to render differently in buggy UAs.'> 14 <link rel="match" href="transform-abspos-ref.html"> 15 <style> 16 body > div { 17 display: inline-table; 18 width: 100px; 19 height: 200px; 20 transform: translate(50px, 50px); 21 background: gold; 22 } 23 body > div > div { 24 width: 200px; 25 height: 100px; 26 position: fixed; 27 left: 50px; 28 top: 100px; 29 background: navy; 30 color: gold; 31 } 32 </style> 33 </head> 34 <body> 35 <div> 36 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 37 <div> 38 0 1 2 3 4 5 6 7 8 9 39 </div> 40 </div> 41 </body> 42 </html>