032-float-wrap.html 937 B

12345678910111213141516
  1. <!doctype html>
  2. <html><head><meta charset="utf-8"><title>032 float text wrap</title>
  3. <style>
  4. html,body{margin:0;padding:0;background:#fff;color:#202020;font-family:sans-serif;font-size:13px}
  5. body{padding:10px}h1{font-size:20px;margin:0 0 8px}p{margin:0 0 10px}
  6. .wrap{width:400px}.float{float:left;width:100px;height:100px;background:#cc3333}
  7. .text{font-size:13px;line-height:18px}.clear{clear:both;height:28px;background:#333;color:#fff;padding-left:4px}
  8. table{border-collapse:collapse}td{padding:0;vertical-align:top}
  9. </style></head><body>
  10. <h1>032 &middot; float text wrap and clear</h1>
  11. <p>Text must wrap to the right of the red float, then the dark bar clears both.</p>
  12. <div class="wrap">
  13. <div class="float"></div>The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs. How vexingly quick daft zebras jump! The five boxing wizards jump quickly.
  14. <div class="clear">cleared</div>
  15. </div>
  16. </body></html>