tor-browser

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

tables-101.xht (1538B)


      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" lang="en">
      3  <head>
      4   <title>CSS Test: Table layout: checking dynamic percentage margin layouts match initial layouts</title>
      5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
      6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/table/dynamic/001.html" type="text/html"/>
      7   <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#margin-properties" />
      8   <meta name="flags" content="dom"/>
      9   <style type="text/css">
     10    table { font-size: 4em; position: absolute; margin-top: 1em; }
     11    td { border: solid; }
     12    .control { color: red; }
     13    .control div { margin-top: 10%; margin-left: 50%; }
     14    .test { color: green; }
     15   </style>
     16   <script type="text/javascript">
     17    function test() {
     18      var element = document.getElementById('test');
     19      element.offsetHeight; // Force initial layout
     20      element.style.marginTop = "10%";
     21      element.style.marginLeft = "50%";
     22    }
     23   </script>
     24  </head>
     25  <body onload="test();">
     26   <p>There should be no red below, only green boxes with snowflakes in them.</p>
     27   <table class="control">
     28    <tr>
     29     <td>
     30      &#x2743;
     31     </td>
     32     <td>
     33      <div>&#x2744;</div>
     34     </td>
     35     <td>
     36      &#x2745;
     37     </td>
     38    </tr>
     39   </table>
     40   <table class="test">
     41    <tr>
     42     <td>
     43      &#x2743;
     44     </td>
     45     <td>
     46      <div id="test">&#x2744;</div>
     47     </td>
     48     <td>
     49      &#x2745;
     50     </td>
     51    </tr>
     52   </table>
     53  </body>
     54 </html>