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.

Quick-add: + add another resource

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.

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.

  // Begin inputs
  input#tab-1.tabs-state(name='tabs-state', type='radio', checked='')
  input#tab-2.tabs-state(name='tabs-state', type='radio')
  input#tab-3.tabs-state(name='tabs-state', type='radio')
  input#tab-4.tabs-state(name='tabs-state', type='radio')
  input#tab-5.tabs-state(name='tabs-state', type='radio')
  // End inputs
  // Begin Labels
    label.tab(for='tab-1') Tab 1
    label.tab(for='tab-2') Tab 2
    label.tab(for='tab-3') Tab 3
    label.tab(for='tab-4') Tab 4
    label.tab(for='tab-5') Tab 5
  // End Labels
  // Begin content
      p Tab content one
      p Tab content two
      p Content will adjust height
      p Tab content three
      p Tab content four
      p Content will adjust height
      p Content will adjust even more
      p Tab content five
  // End content
              body {
  padding: 50px;
  font-family: 'Lato', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;

.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;

@import url(https://fonts.googleapis.com/css?family=Lato);
              // Best suited for 2-5 tabs. For fewer tabs, remove the appropriate input, label, and content div elements from the markup and the tabs will readjust accordingly.
Loading ..................