| <!doctype html> |
| |
| <style> |
| |
| #float1 { |
| float: left; |
| position:absolute; |
| width: 150px; |
| height: 100px; |
| background-color:green; |
| } |
| |
| #float2 { |
| float:right; |
| width:200px; |
| height:30px; |
| background-color:orange |
| } |
| |
| #region1, #region2, #region3 { |
| border: 1px solid black; |
| } |
| |
| #region1 { |
| width: 170px; |
| height: 80px; |
| padding: 5px; |
| } |
| |
| #region2 { |
| width: 390px; |
| height: 89px; |
| padding-top:1px; |
| padding-left:5px; |
| padding-right:5px; |
| margin-left: 100px; |
| margin-top: 50px; |
| } |
| |
| #region3 { |
| width: 390px; |
| height: 85px; |
| padding-left:5px; |
| padding-right:5px; |
| padding-bottom:5px; |
| margin-left: 50px; |
| margin-top: 50px; |
| } |
| |
| p.flow1 { |
| clear:both; |
| margin-bottom: 0px; |
| } |
| |
| p.flow2 { |
| margin-top: 0px; |
| } |
| |
| </style> |
| |
| <p>In the example below, the green float should be at the top of the first region and on the left. It should spill into region two. |
| The orange float should be on the right at the top of region two.</p> |
| |
| <div id="region1"> |
| <p><img id="float1"></p> |
| </div> |
| <div id="region2"> |
| <img id="float2"> |
| <p class="flow1">This line of text should not get out of the region. This line of text should not get out of the region.</p> |
| </div> |
| <div id="region3"> |
| <p class="flow2">This line of text should not get out of the region. This line of text should not get out of the region.</p> |
| <p>This line of text should not get out of the region.</p> |
| </div> |