first-letter-dynamic-003a

:first-letter

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-letter-dynamic-003-ref.xht">
 4   <title>CSS Test: :first-letter</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-letter">
 8   <meta name="flags" content="dom">
 9   <style type="text/css">
10     div#x:first-letter { color: blue; float: left; }
11   </style>
12 </head>
13 <body>
14 <div id="x">Need at least two letters here</div>
15 <script type="text/javascript">
16   document.body.offsetWidth;
17   var div = document.getElementById("x");
18   div.id = "y";
19   div.firstChild.data = "Text";
20 </script>
21 
22 
23 
24 </body></html>