Skip to content

Instantly share code, notes, and snippets.

@ebhoren
Created June 19, 2018 14:26
Show Gist options
  • Save ebhoren/0efe67949c56d520db9f80a2bf36aeaa to your computer and use it in GitHub Desktop.
Save ebhoren/0efe67949c56d520db9f80a2bf36aeaa to your computer and use it in GitHub Desktop.
Basic css to create a responsive table.
table.table-a11y {
display: block;
}
table.table-a11y thead,
table.table-a11y tbody,
table.table-a11y tfoot {
display: block;
}
table.table-a11y tr {
display: flex;
flex-direction: column;
justify-content: flex-start;
width: 100%;
}
@media (min-width: 1024px) {
table.table-a11y tr {
flex-direction: row;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment