visibility-layout-001.xht (1166B)
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: Hidden elements still affect layout</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#visibility" /> 7 <meta name="assert" content="Invisible boxes still affect layout." /> 8 <style type="text/css"> 9 div 10 { 11 height: 1in; 12 width: 1in; 13 } 14 #div1 15 { 16 background: orange; 17 } 18 #div2 19 { 20 background: red; 21 visibility: hidden; 22 } 23 #div3 24 { 25 background: blue; 26 } 27 </style> 28 </head> 29 <body> 30 <p>Test passes if the blue and orange boxes below are not touching and there is no red visible on the page.</p> 31 <div id="div1"></div> 32 <div id="div2">FAIL FAIL</div> 33 <div id="div3"></div> 34 </body> 35 </html>