cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              .demo
  .tabs
    // Begin inputs
    input#tab-1.tabs-state(name='tabs-state', type='radio', checked='')
    input#tab-2.tabs-state(name='tabs-state', type='radio')
    // End inputs
    // Begin Labels
    .flex-tabs
      label.tab(for='tab-1') Tab 1
      label.tab(for='tab-2') Tab 2
    // End Labels
    // Begin content
    .content
      .panel
        // TABLE HERE
        .main
          table
            thead
              tr
                th Column Header 1
                th Column Header 2
                th Column Header 3
                th Column Header 4
            tbody
              tr
                td(data-th='Column Header 1') Content 1
                td(data-th='Column Header 2') Content 1
                td(data-th='Column Header 3') Content 1
                td(data-th='Column Header 4') Content 1
              tr
                td(data-th='Column Header 1') Content 2
                td(data-th='Column Header 2') Content 2
                td(data-th='Column Header 3') Content 2
                td(data-th='Column Header 4') Content 2
              tr
                td(data-th='Column Header 1') Content 3
                td(data-th='Column Header 2') Content 3
                td(data-th='Column Header 3') Content 3
                td(data-th='Column Header 4') Content 3
              tr
                td(data-th='Column Header 1') Content 4
                td(data-th='Column Header 2') Content 4
                td(data-th='Column Header 3') Content 4
                td(data-th='Column Header 4') Content 4 
        
        // END TABLE
      .panel
        p Tab content two
        p Content will adjust height
    // End content
            
          
!
            
              .demo {
  margin: 40px auto;
  width: 70%;
  font-family: 'Lato', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}

// ====== Begin tabs ======
.tabs {
  text-align: center;
  font-weight: 300;
  font-style: normal; }
  .tabs .tabs-state {
    display: none; }
  .tabs .flex-tabs {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between; 
}
.tabs .flex-tabs .tab {
  -webkit-box-flex: 1;
  -webkit-flex-grow: 1;
  -ms-flex-positive: 1;
  flex-grow: 1; 
}

.tabs .tab {
  padding: 20px 10px;
  background-color: white;
  color: #999cab;
  font-size: 16px;
  cursor: pointer;
  border-bottom: 1px solid #e5e6ea;
  font-weight: 400;
  z-index: 1; 
}

.content .panel {
  margin-top: -6px;
  background-color: #fff;
  padding-top: 20px;
  padding-left: 20px;
  border: 1px solid #e5e6ea;
  display: none;
  text-align: left; 
}

.tabs-state:nth-child(1):checked ~ .flex-tabs .tab:nth-child(1), .tabs-state:nth-child(2):checked ~ .flex-tabs .tab:nth-child(2), .tabs-state:nth-child(3):checked ~ .flex-tabs .tab:nth-child(3), .tabs-state:nth-child(4):checked ~ .flex-tabs .tab:nth-child(4), .tabs-state:nth-child(5):checked ~ .flex-tabs .tab:nth-child(5) {
  background-color: #fff;
  color: #13aa7f;
  cursor: default;
  border-top: 1px solid #e5e6ea;
  border-right: 1px solid #e5e6ea;
  border-bottom: 1px solid #fff;
  border-left: 1px solid #e5e6ea; }

.tabs-state:nth-child(1):checked ~ .content .panel:nth-child(1), .tabs-state:nth-child(2):checked ~ .content .panel:nth-child(2), .tabs-state:nth-child(3):checked ~ .content .panel:nth-child(3), .tabs-state:nth-child(4):checked ~ .content .panel:nth-child(4), .tabs-state:nth-child(5):checked ~ .content .panel:nth-child(5) {
      display: block;
}

/* small override to eliminate padding that is needed in most instances, like with text based content */
.panel:first-of-type {
  padding-left: 0;
}

.panel:last-of-type {
  padding-bottom: 20px;
}

// ====== Begin table styles ======
$gray: #999cab;
$lighterblue: #e4f7f2;
$lightblue: #33ccff;
$lightergray-bg: #F5F5F6;
$breakpoint: 750px;

table {
  font-family: 'Lato', sans-serif;
  color: $gray;
  width: 100%;
  
    th {
      letter-spacing: 1px;
      white-space: normal;
      font-size: .7em;      
      text-transform: uppercase;
      background: #FFF;
      line-height: 1.125rem;
      vertical-align: middle;
      padding: 0.5rem 0.625rem 0.625rem;
    }
  
    tbody tr:nth-child(odd) {
        background-color: $lighterblue;
    }
  
    tr {
        td {
            font-size: .8rem;
            display: table-cell;
            line-height: 1.125rem;
            vertical-align: middle;
            padding: 0.7rem 0.625rem 0.625rem;
        }
    }
}

// restructure data on small screens
@media (max-width: $breakpoint) {
  thead tr th {
    display: none;
  }
  tbody tr td {
    display: block;
    &:first-child {
      padding-top: 1rem;
    }
    &:last-child {
      padding-bottom: 1rem;
    }
    &:before {
      display: block;
      content: attr(data-th)": ";
      text-transform: uppercase;
      width: 10rem;
    }
  }
}

@import url(http://fonts.googleapis.com/css?family=Lato);
            
          
!
            
              /*
Explorations for a style guide dashboard.

Closer look at flexible tab stlying here: 
http://codepen.io/jonitrythall/pen/LVvMMV
*/
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console