clipping-007.xht (1074B)
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 <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow" /> 5 <link rel="author" title="David Hyatt" href="mailto:hyatt@netscape.com"/> 6 <style type="text/css"> 7 div { 8 width: 100px; 9 height: 100px; 10 } 11 12 .green { 13 background-color: green; 14 } 15 16 .red { 17 background-color: red; 18 } 19 20 .overflow { 21 overflow: hidden; 22 } 23 24 .positioned { 25 position: absolute; 26 } 27 28 .fixed { 29 position: fixed; 30 left: 100px; 31 top: 100px; 32 } 33 34 .offset { 35 left: 100px; 36 top: 100px; 37 } 38 </style> 39 </head> 40 <body> 41 <p>Test passes if there is <strong>a green square</strong> and <strong>no red</strong>.</p> 42 <!-- This test is checking to make sure overflow is done using a containing 43 block model, and that a fixed positioned element inside an absolute positioned 44 element is not considered overflow. --> 45 46 <div class="overflow positioned"> 47 <div class="fixed"> 48 <div class="offset green positioned"></div> 49 </div> 50 </div> 51 52 </body> 53 </html>