020-table-span.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>020 table colspan</title>
  6. <style>
  7. html, body { margin: 0; padding: 0; background: #ffffff; color: #202020; }
  8. body { font-family: sans-serif; font-size: 13px; }
  9. h1 { font-size: 20px; margin: 10px 0 4px 10px; }
  10. p { margin: 0 0 10px 10px; }
  11. .pane { float: left; width: 440px; margin-left: 10px; }
  12. .label { background: #eeeeee; padding: 4px 6px; margin-bottom: 4px; }
  13. .stage { background: #ffffff; padding: 8px; border: 1px solid #999999; }
  14. td { padding: 4px; border: 1px solid #999999; }
  15. .red { background: #cc3333; color: #ffffff; }
  16. .after { background: #333333; color: #ffffff; height: 24px; margin-top: 8px; padding-left: 4px; }
  17. </style>
  18. </head>
  19. <body>
  20. <h1>020 &middot; table colspan</h1>
  21. <p>The red row must span all three columns in both panes.</p>
  22. <div class="pane">
  23. <div class="label">A: colspan=3</div>
  24. <div class="stage">
  25. <table style="width: 422px">
  26. <tr><td colspan="3" class="red" style="height: 24px">spanning row</td></tr>
  27. <tr><td style="width: 90px">90</td><td style="width: 200px">200</td><td style="width: 132px">132</td></tr>
  28. </table>
  29. <div class="after">after</div>
  30. </div>
  31. </div>
  32. <div class="pane">
  33. <div class="label">B: full-width row</div>
  34. <div class="stage">
  35. <div class="red" style="width: 422px; height: 34px; padding: 4px; border: 1px solid #999999; box-sizing: border-box">spanning row</div>
  36. <table style="width: 422px">
  37. <tr><td style="width: 90px">90</td><td style="width: 200px">200</td><td style="width: 132px">132</td></tr>
  38. </table>
  39. <div class="after">after</div>
  40. </div>
  41. </div>
  42. </body>
  43. </html>