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

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

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.


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