Responsive table
Based on http://css-tricks.com/responsive-data-tables/
by panchroma
HTML
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="table-wrap">
<table class="table table-striped table-condensed table-bordered ">
<thead>
<tr>
<th>Team</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>R</th>
<th>H</th>
<th>E</th>
<th>Record</th>
</tr>
</thead>
<tbody>
<tr>
<td>V</td>
<td>B</td>
<td>C</td>
<td>D</td>
<td>E</td>
<td>F</td>
<td>G</td>
<td>H</td>
<td>I</td>
<td>J</td>
<td>K</td>
<td>L</td>
<td>M</td>
<td>N</td>
<td>O</td>
<td>P</td>
<td>Q</td>
</tr>
<tr>
<td>H</td>
<td>B2</td>
<td>C2</td>
<td>D2</td>
<td>E2</td>
<td>F2</td>
<td>G2</td>
<td>H2</td>
<td>I2</td>
<td>J2</td>
<td>K2</td>
<td>L2</td>
<td>M2</td>
<td>N2</td>
<td>O2</td>
<td>P2</td>
<td>Q2</td>
</tr>
</tbody>
</table>
</div> <!-- end table-wrap -->
</div> <!-- end table data -->
<div class="col-md-4">
<div class="sidebar-wrap"><h4>Today's Best Images</h4>
<div class="sidebar-image"><img style="float:left" src="http://lorempixel.com/75/75/sports/">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut orci vitae nisl viverra...
CSS
body{
padding-top:20px;
background-color:black;
}
.table-wrap, .sidebar-wrap{
background-color:#666;
padding:10px;
border-radius:5px;
margin-bottom:15px;
overflow:hidden;
}
.sidebar-image{
clear:left;
}
@media
only screen and (max-width: 570px) {
/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr { border: 1px solid #ccc; }
td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 30%!important;
}
td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 45%;
padding-right: 20px;
white-space: nowrap;
}
/*
Label the data
*/
td:nth-of-type(1):before { content: "Team"; }
td:nth-of-type(2):before { content: "1"; }
td:nth-of-type(3):before { content: "2"; }
td:nth-of-type(4):before { content: "3"; }
td:nth-of-type(5):before { content: "4"; }
td:nth-of-type(6):before { content: "5"; }
td:nth-of-type(7):before { content: "6"; }
td:nth-of-type(8):before { content: "7"; }
td:nth-of-type(9):before { content: "8"; }
td:nth-of-type(10):before { content: "9" }
td:nth-of-type(11):before { content: "10"; }
td:nth-of-type(12):before { content: "11"; }
td:nth-of-type(13):before { content: "12:"; }
td:nth-of-type(14):before { content: "R"; }
td:nth-of-type(15):before { content: "H"; }
td:nth-of-type(16):before { content: "E"; }
td:nth-of-type(17):before { content: "Record"; }
}