004-float-row.html 1.2 KB

123456789101112131415161718192021
  1. <!doctype html>
  2. <html><head><meta charset="utf-8"><title>004 float row</title>
  3. <style>
  4. html,body{margin:0;padding:0;background:#fff;color:#202020;font-family:sans-serif;font-size:13px}
  5. h1{font-size:20px;margin:10px 0 4px 10px}p{margin:0 0 10px 10px}
  6. .pane{float:left;width:440px;margin-left:10px}.label{background:#eee;padding:4px 6px;margin-bottom:4px}
  7. .stage{background:#fff;padding:8px;border:1px solid #999}
  8. .red{background:#cc3333}.green{background:#22aa44}.after{background:#333;color:#fff;height:24px;margin-top:8px;padding-left:4px}
  9. </style></head><body>
  10. <h1>004 &middot; float row</h1>
  11. <p>Two 150 px columns side by side, with the bar below.</p>
  12. <div class="pane"><div class="label">A: floats</div><div class="stage">
  13. <div class="red" style="float:left;width:150px;height:50px"></div>
  14. <div class="green" style="float:right;width:150px;height:50px"></div>
  15. <div class="after">after</div>
  16. </div></div>
  17. <div class="pane"><div class="label">B: table</div><div class="stage">
  18. <table style="width:100%"><tr><td style="width:50%" class="red" height="50"></td><td style="width:50%" class="green" height="50"></td></tr></table>
  19. <div class="after">after</div>
  20. </div></div>
  21. </body></html>