| <!doctype html> |
| |
| <style> |
| #content { |
| -webkit-flow-into: flow1; |
| text-align: justify; |
| padding: 5px; |
| } |
| |
| #first-box { |
| border: 1px solid blue; |
| padding:5px; |
| } |
| |
| #second-box { |
| border: 1px solid green; |
| overflow:hidden; |
| } |
| |
| #region1, #region2, #region3 { |
| border: 1px solid black; |
| -webkit-flow-from: flow1; |
| } |
| |
| #region1 { |
| width: 400px; |
| height: 150px; |
| } |
| |
| #region2 { |
| width: 400px; |
| height: 150px; |
| } |
| |
| #region3 { |
| width: 400px; |
| height: 150px; |
| } |
| |
| .float { width:30px; height:50px; background-color: lime } |
| .left { float: left } |
| .right { float: right } |
| </style> |
| |
| <body> |
| <p>The first and last lines of text in the regions below should be clipped to the green box. The overflow |
| section sizes itself and clips differently in each region. The green box should be even with the lime floats at the top of the first region.</p> |
| |
| <div id="content"> |
| <div id="first-box"> |
| <div class="float left" id="float1"></div> <div class="float right" id="float2"></div> |
| <div id="second-box"> |
| <p>These lines will not spill out of the regions. These lines will not spill out of the regions. |
| These lines will not spill out of the regions. These lines will not spill out of the regions. </p> |
| <p>These lines will not spill out of the regions. These lines will not spill out of the regions. |
| These lines will not spill out of the regions. These lines will not spill out of the regions. </p> |
| </div> |
| </div> |
| </div> |
| |
| <div id="container"> |
| <div id="region1"></div> |
| <div id="region2"></div> |
| <div id="region3"></div> |
| </div> |
| |
| <script> |
| document.body.offsetLeft; |
| document.getElementById('float1').style.width = '50px'; |
| document.getElementById('float2').style.width = '50px'; |
| </script> |