| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <style id="stylesheet"> | |
| 5 #shape-inside { | |
| 6 position: relative; | |
| 7 padding: 20.5px 35px 25px 15px; | |
| 8 width: 150px; | |
| 9 height: 175px; | |
| 10 } | |
| 11 #border { | |
| 12 position: absolute; | |
| 13 top: 13px; | |
| 14 left: 8px; | |
| 15 width: 161px; | |
| 16 height: 186px; | |
| 17 border: 2px solid blue; | |
| 18 } | |
| 19 </style> | |
| 20 <script> | |
| 21 function init() { | |
| 22 // If subpixel layout is not enabled, fix shape-inside's padding-top value. | |
| 23 var shapeInsideElt = document.getElementById("shape-inside"); | |
| 24 if (window.getComputedStyle(shapeInsideElt).paddingTop == "20px") | |
| 25 shapeInsideElt.style.paddingTop = "21px" | |
| 26 } | |
| 27 </script> | |
| 28 </head> | |
| 29 <body onload="init()"> | |
| 30 <div id="shape-inside"> | |
| 31 <div id="border"></div> | |
| 32 This text should be contained by the blue square. | |
| 33 </div> | |
| 34 </body> | |
| 35 </html> | |
| OLD | NEW |