border-dynamic-002

Dynamic Borders (class 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 (class 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/002.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    .border { border: solid lime; }
13   </style>
14  </head>
15  <body>
16   <p>There should be a big green box below.</p>
17   <div id="test">
18    <div></div>
19   </div>
20   <script type="text/javascript">
21    var x = document.getElementById('test');
22    x.clientHeight; // force reflow
23    x.className += " border";
24   </script>
25  
26 </body>
27 </html>