Skip to content

Instantly share code, notes, and snippets.

@robspangler
Last active October 31, 2018 21:26
Show Gist options
  • Save robspangler/b6e5b5683684e2ad81562a83340135e0 to your computer and use it in GitHub Desktop.
Save robspangler/b6e5b5683684e2ad81562a83340135e0 to your computer and use it in GitHub Desktop.
@media (max-width: 767px) {
.table-swipe { position: relative; }
.table-swipe table { max-width: calc(100% - 12px) !important; }
.table-swipe .wrap { width: 100%; overflow-y: scroll; -webkit-overflow-scrolling: touch; }
.table-swipe::before { display: block; z-index: 1; content: ''; position: absolute; right: 0; width: 12px; height: 100%;
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffffff+0,ffffff+100&0+0,1+100 */
background: -moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=1 ); /* IE6-9 */
}
}
<div class="table-swipe">
<div class="wrap">
<table>
...
</table>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment