Advertising - Data Chart

Bootstrap 3 Responsive Tables

by freedawirl

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="//drive.google.com/drive/folders/0B1DuAIGoQkJCRVBHRGxGMVE0VTA"></script>
<div class="container">

  <div id="no-more-tables" class="row">
    <table class="table table-bordered table-striped table-condensed cf">
      <thead class="cf">
        <tr>
          <th>Units</th>
          <th>Size</th>
          <th class="numeric">Standard</th>
          <th class="numeric">*Peak</th>
          <th class="numeric">Install Fee</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td data-title="Units">1 train = both sides</td>
          <td data-title="Size">See template</td>
          <td data-title="Standard" class="numeric">$26,544</td>
          <td data-title="*Peak" class="numeric">$33,180</td>
          <td data-title="Install Fee" class="numeric">$6,200</td>
        </tr>
      </tbody>
    </table>
    <p class="col-md-12 center"> <em>*Peak Times (SXSW, ACL FEST, F1, X GAMES)</em></p>
  </div>
  <div class="row ad-pics">
    <div class="col-xs-12 col-sm-8 col-md-7 col-lg-9"> <img class="img-responsive" src="http://www.capmetro.org/uploadedImages/Capmetroorg/Business/TransitAds/Rail-Ad-Full-Wrap.png" alt="Full Wrap Rail Ad" draggable="false">
    </div>
    <div class="col-xs-12 col-sm-4 col-md-5 col-lg-3">
      <a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox" draggable="false"><img src="http://www.capmetro.org/uploadedImages/Capmetroorg/Business/TransitAds/full-wrap-side-view-rail-ad-live-sample.jpg" alt="..." />
        <small>SEE SAMPLE</small>
      </a>
    </div>
  </div>

</div>


<table class="table table-bordered table-striped bluechart">
  <tbody>
    <tr>
      <td class="no-border no-background">&nbsp;</td>
      <td class="no-border no-background" colspan="3">
        <h5>1 unit (bus)</h5></td>
     ...

CSS

@media only screen and (max-width: 800px) {
  /* Force table to not be like tables anymore */
  #no-more-tables table,
  #no-more-tables thead,
  #no-more-tables tbody,
  #no-more-tables th,
  #no-more-tables td,
  #no-more-tables tr {
    display: block;
  }
  #lightbox {
    width: 788px !important;
    border: 12px solid rgba(200, 200, 200, 0.4) !important;
    border-radius: 10px;
    background: transparent !important;
  }
  #lightbox img#lightboxImage {
    width: 100%;
  }
  #lightbox,
  .MetroAds #lightbox #lightboxDetails {
    padding: 0px
  }
  #lightbox #closeButton {
    top: -5px;
    right: -5px;
  }
  /* Hide table headers (but not display: none;, for accessibility) */
  #no-more-tables thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  #no-more-tables tr {
    border: 1px solid #ccc;
  }
  #no-more-tables td {
    /* Behave  like a "row" */
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, .095);
    position: relative;
    padding-left: 50%;
    white-space: normal;
    text-align: left;
  }
  #no-more-tables td:before {
    /* Now like a table header */
    position: absolute;
    /* Top/left values mimic padding */
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
  }
  /*
	Label the data
	*/
  #no-more-tables td:before {
    content: attr(data-title);
  }
}


/****************************************************************************************************************
 * Table Overrides
 ****************************************************************************************************************/

.table-bordered {
  border-color: silver;
}

.table thead,
.table tr > th {
  background-color: #0069aa;
  color: #fff;
  font-size: 110%;
}

.table thead i {
  color: #fff;
}

.table > thead > tr > th {
  padding: 10px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #ECECEC;
}

.table > tbody >...