clipping-003.xht (909B)
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: CSS test</title> 5 <link rel="author" title="David Hyatt" href="mailto:hyatt@netscape.com"/> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow" /> 7 <style type="text/css"> 8 .green { 9 width: 100px; 10 height: 100px; 11 background-color: green; 12 } 13 14 .red { 15 width: 100px; 16 height: 100px; 17 margin-top: 100px; 18 margin-left: 100px; 19 background-color: red; 20 } 21 22 .overflow { 23 overflow: hidden; 24 width: 100px; 25 height: 100px; 26 } 27 28 .positioned { 29 position: absolute; 30 left:150px; 31 top: 100px; 32 } 33 </style> 34 </head> 35 <body> 36 <p>Test passes if there is <strong>a green square</strong> and <strong>no red</strong>.</p> 37 38 <div class="overflow"> 39 <div class="red"></div> 40 <div class="green positioned"></div> 41 </div> 42 </body> 43 </html>