clipping-002.xht (947B)
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: 'overflow': Basic Test</title> 5 <link rel="author" title="David Hyatt" href="mailto:hyatt@netscape.com"/> 6 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/clipping/002.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow" /> 9 <style type="text/css"> 10 .green { 11 width: 100px; 12 height: 100px; 13 background-color: green; 14 } 15 16 .red { 17 width: 100px; 18 height: 100px; 19 background-color: red; 20 margin-top:100px; 21 } 22 23 .overflow { 24 overflow: hidden; 25 } 26 </style> 27 </head> 28 <body> 29 <p>Test passes if there is <strong>a green square</strong> and <strong>no red</strong>.</p> 30 31 <div class="green overflow"><div class="red"></div></div> 32 </body> 33 </html>