border-dynamic-001

Dynamic Borders (style attribute)

WeasyPrint

This browser

Flags
dom

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 <head>
 4   <title>CSS Test: Dynamic Borders (style attribute)</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/border/dynamic/001.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#border-shorthand-properties">
 8   <meta name="flags" content="dom">
 9   <style type="text/css">
10    #test { background: green; }
11    #test div { margin: 10em 0; background: red; }
12   </style>
13  </head>
14  <body>
15   <p>There should be a big green box below.</p>
16   <div id="test">
17    <div></div>
18   </div>
19   <script type="text/javascript">
20    var x = document.getElementById('test');
21    x.clientHeight; // force reflow
22    x.style.border = "solid lime";
23   </script>
24  
25 </body>
26 </html>