Skip to content

Instantly share code, notes, and snippets.

@abarrak
Last active August 16, 2016 22:48
Show Gist options
  • Select an option

  • Save abarrak/863ba1a7aacf00ff931e867ea78c35a5 to your computer and use it in GitHub Desktop.

Select an option

Save abarrak/863ba1a7aacf00ff931e867ea78c35a5 to your computer and use it in GitHub Desktop.
Contained Table Scrolling

One strategy to make tables look nice on smaller devices is to contain them in an element with the follwoing style:

.table-container {
  width: 100%;
  overflow-x: auto;
}

In my_page.html:

<div class="table-container">
  <table>
    <!-- ... -->
  </table>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment