first-line-floats-004

:first-line

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

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><head>
 3     <link rel="reference" href="first-line-floats-001-ref.xht">
 4     <title>CSS Test: :first-line</title>
 5     <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu">
 6     <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
 7     <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo">
 8     <meta name="flags" content="dom">
 9     <style type="text/css">
10       div { color: green }
11       div:first-line { color: red }
12     </style>
13     <script type="text/javascript">
14       function runTest() {
15         var s = document.createElement("span");
16         s.setAttribute("style", "float: left");
17         s.appendChild(document.createTextNode("This should be green"));
18         var i = document.getElementById("i");
19         i.parentNode.insertBefore(s, i);
20       }
21     </script>
22   </head>
23   <body onload="runTest()">
24     <div><span id="i"></span></div>
25   
26 
27 
28 </body></html>