Skip to content

Instantly share code, notes, and snippets.

@todthomson
Created October 29, 2014 07:27
Show Gist options
  • Select an option

  • Save todthomson/8356f649763e5f7abb42 to your computer and use it in GitHub Desktop.

Select an option

Save todthomson/8356f649763e5f7abb42 to your computer and use it in GitHub Desktop.
.table-scrollable
{
width: 100%;
border-collapse: collapse;
border-spacing: 0;
}
.table-scrollable thead,
.table-scrollable tbody,
.table-scrollable tr,
.table-scrollable td,
.table-scrollable th
{
display: block;
}
.table-scrollable tr:after
{
content: ' ';
display: block;
visibility: hidden;
clear: both;
}
.table-scrollable thead th
{
height: 32px;
line-height: 32px;
}
.table-scrollable tbody
{
height: 200px;
overflow-y: scroll;
}
.table-scrollable thead
{
width: 97%;
width: calc(100% - 17px);
}
.table-scrollable tbody td,
.table-scrollable thead th
{
width: 20%;
float: left;
}
.table-scrollable tbody td:last-child,
.table-scrollable thead th:last-child
{
border-right: none;
}
.table-scrollable > tbody > tr > td
{
padding: 13px 9px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment