tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

float-non-replaced-height-001.xht (1501B)


      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: Floated non-replaced element with 'margin-top', margin-bottom' set to 'auto' and 'height' relying on the descendants</title>
      5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
      6         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#block-root-margin" />
      7         <link rel="match" href="float-non-replaced-height-001-ref.xht" />
      8 
      9         <meta name="assert" content="If 'height' is 'auto' on an floated non-replaced element then the 'height' depends on the descendants." />
     10         <style type="text/css">
     11             #div1
     12             {
     13                 position: relative;
     14             }
     15             #div2
     16             {
     17                 background: blue;
     18                 float: left;
     19             }
     20             #div2 div, #div3
     21             {
     22                 height: 1in;
     23                 width: 1in;
     24             }
     25             #div3
     26             {
     27                 background: orange;
     28                 left: 1in;
     29                 position: absolute;
     30                 top: 0;
     31             }
     32         </style>
     33     </head>
     34     <body>
     35         <p>Test passes if the blue and orange squares have the same height.</p>
     36         <div id="div1">
     37             <div id="div2">
     38                 <div></div>
     39             </div>
     40             <div id="div3"></div>
     41         </div>
     42     </body>
     43 </html>