1291110-2-ref.html (658B)
1 <!DOCTYPE html> 2 <style> 3 .container { 4 position: relative; 5 width: 250px; 6 height: 300px; 7 border: 1px solid blue; 8 } 9 10 .float1 { 11 position: absolute; 12 width: 100px; 13 height: 50px; 14 background-color: green; 15 } 16 17 .float2 { 18 position: absolute; 19 top: 50px; 20 left: 70px; 21 width: 180px; 22 height: 50px; 23 background-color: lightgreen; 24 } 25 26 .box { 27 position: absolute; 28 top: 50px; 29 width: 30px; 30 height: 80px; 31 background-color: blue; 32 } 33 </style> 34 35 <div class="container"> 36 <div class="float1"></div> 37 <div class="float2"></div> 38 <div class="box"></div> 39 </div> 40 <p>The test pass if the inline blue box does not overlap any of the green float boxes.</p>