cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <body style="padding:50px;">
<div class="row-fluid">
  <div class="page-header">
    <h2>Assignments for Day 1</h2>
    <h4 class="muted">Class #684</h4>
  </div>
  
  <table class="table table-header-rotated table-striped table-hover table-striped-column">
    <thead>
      <tr>
        <th class="row-header">Trainee</th>
        <!-- Following headers are rotated -->
        <th class="rotate-45"><div><span>Learning Styles Assessment</span></div></th>
        <th class="rotate-45"><div><span>Video #2 - Company Value & Goals</span></div></th>
        <th class="rotate-45"><div><span>Video #3 - The Technician Job</span></div></th>
        <th class="rotate-45"><div><span>Vidoe #5 - Custom Service</span></div></th>
        <th class="rotate-45"><div><span>Safety Awareness Questionnaire</span></div></th>
        <th class="rotate-45"><div><span>Video #8 - Muscular Injury Prevention</span></div></th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Obama, Barak</td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
      </tr>
      <tr>
        <td>Regan, Ronald</td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
        <td></td>
      </tr>
      <tr>
        <td>Washington, George</td>
        <td></td>
        <td></td>
        <td></td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
        <td></td>
        <td><span class="label label-success"><i class="icon-ok icon-white"></i></span></td>
      </tr>
    </tbody>
  </table>
</div>
</body>
            
          
!
            
              

.table-header-rotated th.rotate-45{
  height: 160px;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  position: relative;
  vertical-align: bottom;
  padding: 0;
  font-size: 12px;
  line-height: 0.8;
}

.table-header-rotated th.rotate-45 > div{
  position: relative;
  top: 0px;
  left: -80px; /* 80 * tan(45) / 2 = 40 where 80 is the height on the cell and 45 is the transform angle*/
  height: 100%;
  -ms-transform:skew(45deg,0deg);
  -moz-transform:skew(45deg,0deg);
  -webkit-transform:skew(45deg,0deg);
  -o-transform:skew(45deg,0deg);
  transform:skew(45deg,0deg);
  overflow: hidden;

}

.table-header-rotated th.rotate-45 span {
  -ms-transform:skew(-45deg,0deg) rotate(45deg);
  -moz-transform:skew(-45deg,0deg) rotate(45deg);
  -webkit-transform:skew(-45deg,0deg) rotate(45deg);
  -o-transform:skew(-45deg,0deg) rotate(45deg);
  transform:skew(-45deg,0deg) rotate(45deg);
  position: absolute;
  bottom: 120px; /* 40 cos(45) = 28 with an additional 2px margin*/
  left: -25px; /*Because it looked good, but there is probably a mathematical link here as well*/
  display: inline-block;
  width: 100%;
  width: 85px; /* 80 / cos(45) - 40 cos (45) = 85 where 80 is the height of the cell, 40 the width of the cell and 45 the transform angle*/
  text-align: left;
  white-space: nowrap; /*whether to display in one line or not*/
}
  
.table-striped-column > thead > tr th:nth-of-type(even) div {
    background-color: #eee;
}

.table-striped-column > tbody > tr td:nth-of-type(even) {
    background-color: #eee;
}
            
          
!
            
              // http://www.himpfen.com/zebra-striping-table-columns-bootstrap/
// http://jimmybonney.com/articles/column_header_rotation_css/
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console