You are here

responsive-tables.css in Zurb Responsive Tables 7

table th {
  font-weight: bold;
}
table td,
table th {
  padding: 9px 10px;
  text-align: left;
}

/* Mobile */
@media only screen and (max-width: 767px) {

  table.responsive {
    margin-bottom: 0;
  }

  table.responsive td,
  .pinned td {
    height: 30px;
    padding: 5px;
    margin: 0px;
  }

  .pinned {
    position: absolute;
    left: 0;
    top: 0;
    width: 35%;
    overflow: hidden;
    white-space: nowrap;
    overflow-x: scroll;
    border-right: 1px solid #ccc;
    border-left: 1px solid #ccc;
  }

  .pinned table {
    border-right: none;
    border-left: none;
    width: 100%;
  }

  .pinned table th {
    white-space: nowrap;
  }

  .pinned td:last-child {
    border-bottom: 0;
  }

  div.table-wrapper {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    border-right: 1px solid #ccc;
  }

  div.table-wrapper div.scrollable {
    margin-left: 35%;
  }

  div.table-wrapper div.scrollable {
    overflow: scroll;
    overflow-y: hidden;
  }

  table.responsive td,
  table.responsive th {
    position: relative;
    white-space: nowrap;
    overflow: hidden;
  }

  .pinned th,
  table.responsive th {
    border-bottom: 1px solid #ccc;
  }

  table.responsive th:first-child,
  table.responsive td:first-child,
  table.responsive td:first-child,
  table.responsive.pinned td {
    display: none;
  }
}

File

css/responsive-tables.css
View source
  1. table th {
  2. font-weight: bold;
  3. }
  4. table td,
  5. table th {
  6. padding: 9px 10px;
  7. text-align: left;
  8. }
  9. /* Mobile */
  10. @media only screen and (max-width: 767px) {
  11. table.responsive {
  12. margin-bottom: 0;
  13. }
  14. table.responsive td,
  15. .pinned td {
  16. height: 30px;
  17. padding: 5px;
  18. margin: 0px;
  19. }
  20. .pinned {
  21. position: absolute;
  22. left: 0;
  23. top: 0;
  24. width: 35%;
  25. overflow: hidden;
  26. white-space: nowrap;
  27. overflow-x: scroll;
  28. border-right: 1px solid #ccc;
  29. border-left: 1px solid #ccc;
  30. }
  31. .pinned table {
  32. border-right: none;
  33. border-left: none;
  34. width: 100%;
  35. }
  36. .pinned table th {
  37. white-space: nowrap;
  38. }
  39. .pinned td:last-child {
  40. border-bottom: 0;
  41. }
  42. div.table-wrapper {
  43. position: relative;
  44. margin-bottom: 20px;
  45. overflow: hidden;
  46. border-bottom: 1px solid #ccc;
  47. border-right: 1px solid #ccc;
  48. }
  49. div.table-wrapper div.scrollable {
  50. margin-left: 35%;
  51. }
  52. div.table-wrapper div.scrollable {
  53. overflow: scroll;
  54. overflow-y: hidden;
  55. }
  56. table.responsive td,
  57. table.responsive th {
  58. position: relative;
  59. white-space: nowrap;
  60. overflow: hidden;
  61. }
  62. .pinned th,
  63. table.responsive th {
  64. border-bottom: 1px solid #ccc;
  65. }
  66. table.responsive th:first-child,
  67. table.responsive td:first-child,
  68. table.responsive td:first-child,
  69. table.responsive.pinned td {
  70. display: none;
  71. }
  72. }