Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
|
esprehn
2014/05/20 19:42:46
We usually leave off <html>, <head> and <body>
| |
| 4 <style> | |
| 5 body { | |
| 6 margin: 0; | |
| 7 padding: 0; | |
| 8 } | |
| 9 #container { | |
| 10 position: relative; | |
| 11 background: #ccc; | |
| 12 font: 20px Ahem; | |
| 13 } | |
| 14 #floater { | |
| 15 float: none; | |
| 16 } | |
| 17 </style> | |
| 18 <script src="../../resources/check-layout.js"></script> | |
| 19 </head> | |
| 20 <body onload="checkLayout('#container')"> | |
|
esprehn
2014/05/20 19:42:46
I'd just do onload = function() { ... } in the scr
| |
| 21 <p> When a block element becomes a float we should strip any anonymous b locks wrapping its inline siblings.</p> | |
| 22 <div id="container"> | |
| 23 <span id="content"> | |
| 24 Some<br /> | |
| 25 content<br /> | |
| 26 here. | |
| 27 </span> | |
| 28 <div id="floater" data-offset-y=40> | |
| 29 Should appear inside grey box. | |
| 30 </div> | |
| 31 </div> | |
| 32 <script> | |
| 33 document.body.offsetTop; | |
| 34 document.getElementById('floater').style.float = 'right'; | |
| 35 </script> | |
| 36 </body> | |
| 37 </html> | |
| 38 | |
| 39 | |
| OLD | NEW |