Advertisement
pglaz

Table test:hover

Jun 29th, 2013
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.20 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <head>
  3.  
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5.  
  6. <style type="text/css">
  7. table
  8. {
  9. background: #fff;
  10. border-collapse: collapse;
  11. border-top: 2px solid #222529;
  12. border-bottom: 2px solid #222529;
  13. margin: 20px auto;
  14. padding: 5px;
  15. width: 100%;
  16. }
  17.  
  18. caption
  19. {
  20. padding: 5px;
  21. text-align: center;
  22. border-top: 1px solid #222529;
  23. background: #f9faff;
  24. color: #282828;
  25. }
  26.  
  27. th,td
  28. {
  29. padding: 1%;
  30. text-align: center;
  31. }
  32.  
  33. tr:hover,tr.alt:hover
  34. {
  35. background: #f7dcdf;
  36. }
  37.  
  38. td
  39. {
  40. border: 1px dotted #222529;
  41. vertical-align: middle;
  42. }
  43.  
  44. th
  45. {
  46. background: #222529;
  47. color: #fff;
  48. font-weight: bold;
  49. }
  50.  
  51. th[scope=row]
  52. {
  53. background: #62B1D0;
  54. padding: 5px;
  55. }
  56.  
  57. tr.alt td
  58. {
  59. background: #daecf5;
  60. }
  61.  
  62. th a:link, th a:active, th a:visited
  63. {
  64. color: #525357;
  65. font-weight: bold;
  66. }
  67.  
  68. th a:hover
  69. {
  70. color: #6d787e;
  71. }
  72. </style>
  73.  
  74. </head>
  75. <body>
  76.  
  77. <table>
  78. <caption>Test table</caption>
  79.  
  80. <tr>
  81. <th>ABC</th>
  82. <th>DEF</th>
  83. <th>GHJ</th>
  84. </tr>
  85.  
  86. <tr>
  87. <td>Lorem</td>
  88. <td>Lipsum</td>
  89. <td style="text-align: center">4/5</td>
  90. </tr>
  91.  
  92. <tr class="alt">
  93. <td>Lorem</td>
  94. <td>Lipsum</td>
  95. <td style="text-align: center">1/5</td>
  96. </tr>
  97. </table>
  98.  
  99. </body>
  100. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement