Last active
August 29, 2015 14:13
-
-
Save k4zuki02h4t4/3bc37d93d46c39379b50 to your computer and use it in GitHub Desktop.
table タグのレスポンシブデザイン対応。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table { | |
border-collapse: collapse; | |
border-spacing: 0; | |
border-width: 1px 0 0 1px; | |
table-layout: fixed; | |
width: auto; | |
} | |
thead, th { | |
background: #ddd; | |
text-align: left; | |
} | |
th, td { | |
padding: 5px; | |
border: 1px #e7e7e7 solid; | |
} | |
td, th { | |
padding: 5px; | |
border: 1px #e7e7e7 solid; | |
} | |
.table-wrap { | |
margin: 0 !important; | |
overflow: scroll; | |
overflow-y: hidden; | |
padding: 0 !important; | |
position: relative; | |
width: 100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('table').each(function() { | |
$(this).wrap("<div class='table-wrap'></div>"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment