You are here

simple-responsive-table.css in Simple Responsive Table 8

/* Start table responsive */
/* Force table to not be like tables anymore */
table,
thead,
tbody,
th,
td,
tr {
  display: block;
}

/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
  position: absolute;
  top: -9999px;
  left: -9999px;
}

tr {
  border: 1px solid #ccc;
}

td {
  /* Behave  like a "row" */
  border: none !important;
  border-bottom: 1px solid #eee !important;
  position: relative !important;
  padding-left: 50% !important;
  white-space: normal !important;
  text-align: left !important;
}

td:before {
  /* Now like a table header */
  position: absolute;
  left: 1%;
  padding-right: 10px;
  white-space: nowrap;
  text-align: left;
  font-weight: bold;
}

/* Label the data */
td:before {
  content: attr(data-title);
  white-space: normal;
}
/* Empty row data */
td>div.simple-responsive-table-empty-row-data {
  min-height: 1.5em;
}
/* End table responsive */
/* Start action dropdown multiple */
.js table td .dropbutton-multiple {
  padding-right: inherit;
}
/* End action dropdown multiple */

File

css/simple-responsive-table.css
View source
  1. /* Start table responsive */
  2. /* Force table to not be like tables anymore */
  3. table,
  4. thead,
  5. tbody,
  6. th,
  7. td,
  8. tr {
  9. display: block;
  10. }
  11. /* Hide table headers (but not display: none;, for accessibility) */
  12. thead tr {
  13. position: absolute;
  14. top: -9999px;
  15. left: -9999px;
  16. }
  17. tr {
  18. border: 1px solid #ccc;
  19. }
  20. td {
  21. /* Behave like a "row" */
  22. border: none !important;
  23. border-bottom: 1px solid #eee !important;
  24. position: relative !important;
  25. padding-left: 50% !important;
  26. white-space: normal !important;
  27. text-align: left !important;
  28. }
  29. td:before {
  30. /* Now like a table header */
  31. position: absolute;
  32. left: 1%;
  33. padding-right: 10px;
  34. white-space: nowrap;
  35. text-align: left;
  36. font-weight: bold;
  37. }
  38. /* Label the data */
  39. td:before {
  40. content: attr(data-title);
  41. white-space: normal;
  42. }
  43. /* Empty row data */
  44. td>div.simple-responsive-table-empty-row-data {
  45. min-height: 1.5em;
  46. }
  47. /* End table responsive */
  48. /* Start action dropdown multiple */
  49. .js table td .dropbutton-multiple {
  50. padding-right: inherit;
  51. }
  52. /* End action dropdown multiple */