border-collapse-table-ref.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html lang="en-US">
  4. <head>
  5. <title>Table background tests</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <meta http-equiv="Content-Style-Type" content="text/css">
  8. <style type="text/css">
  9. html, body { margin: 0; padding: 0; border: 0; font-size: 16px; }
  10. body { padding: 15px; }
  11. /*
  12. table {
  13. margin: 0px 3px 2px 4px;
  14. border-width: 4px 2px 8px 6px;
  15. height is 97px:
  16. (2px of border outside height)
  17. extra border width for top row: 0
  18. cell * 5: == 19px * 5 == 95px
  19. border-top: 2px;
  20. padding-top: 1px;
  21. height: 10px;
  22. padding-bottom: 4px;
  23. border-bottom: 2px;
  24. extra border width for top row: 2px
  25. (4px of border outside height)
  26. width is 287px:
  27. (3px of border outside width)
  28. extra border width for left column: 2px
  29. cell * 5: == 57px * 5 == 285px
  30. border-left: 1px;
  31. padding-left: 3px;
  32. width: 50px;
  33. padding-right: 2px;
  34. border-right: 1px;
  35. (1px of border outside width)
  36. */
  37. div { width: 291px; height: 103px; margin: 0px 3px 2px 4px; }
  38. div.color { background-color: aqua; }
  39. div.imagetl, div.imagebr {
  40. background-image: url(repeatable-diagonal-gradient-with-ticks.png);
  41. }
  42. div.imagetl { background-position: 3px 2px;}
  43. div.imagebr { background-position: 290px 99px;}
  44. </style>
  45. </head>
  46. <body>
  47. <div class="color"></div>
  48. <div class="imagetl"></div>
  49. <div class="imagebr"></div>
  50. </body>
  51. </html>