| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 #container { | 5 #container { |
| 6 border: 2px solid blue; | |
| 7 position: relative; | 6 position: relative; |
| 7 font: 20px Ahem, sans-serif; |
| 8 -webkit-font-smoothing: none; |
| 9 line-height: 20px; |
| 8 width: 200px; | 10 width: 200px; |
| 9 height: 200px; | 11 height: 200px; |
| 12 border: 2px solid blue; |
| 10 } | 13 } |
| 11 #border { | 14 #shape-inside { |
| 12 position: absolute; | 15 margin-top: -2px; |
| 13 left: 48px; | 16 padding-top: 1px; |
| 17 margin-left: 49px; |
| 14 width: 100px; | 18 width: 100px; |
| 15 height: 50px; | 19 height: 49px; |
| 16 border: 2px solid green; | 20 border: 1px solid green; |
| 17 } | |
| 18 .spacer { | |
| 19 width: 50px; | |
| 20 height: 50px; | |
| 21 } | 21 } |
| 22 </style> | 22 </style> |
| 23 </head> | 23 </head> |
| 24 <body> | 24 <body> |
| 25 <div id="container"> | 25 <div id="container"> |
| 26 <div id="border"></div> | 26 <div id="shape-inside">X X X X X X</div> |
| 27 <div id="shape-inside"> | 27 <div>X X X X X X</div> |
| 28 <div class="spacer" style="float:left"></div> | |
| 29 <div class="spacer" style="float:right"></div> | |
| 30 This text should wrap inside the green rectangle, and overflow shoul
d wrap | |
| 31 inside the blue rectangle. | |
| 32 </div> | |
| 33 </div> | 28 </div> |
| 29 <p>Requires Ahem font. The content should wrap inside the green rectangle, a
nd the overflow should wrap inside the blue rectangle.</p> |
| 30 |
| 34 </body> | 31 </body> |
| 35 </html> | 32 </html> |
| OLD | NEW |