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.

            
              <p class="explanation">This is old kinda bad version, demonstrating the height problem.</p>

<div class="tabs">

  <div class="tab">
    <input type="radio" id="tab-1" name="tab-group-1" checked>
    <label for="tab-1">Breakfast</label>

    <div class="panel">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/bacon.jpg" alt="mountain" / align="left" alt="Gimme Bacon!">
      <p>Breakfast will be a exquisite pile of bacon served on a Thanksgisving platter. No eggs, no toast and no orange juice. Serves 1 person.

      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.</p>
    </div> 
  </div>

  <div class="tab">
    <input type="radio" id="tab-2" name="tab-group-1">
    <label for="tab-2">Dinner</label>

    <div class="panel">
      <p>Dinner will be graciously catered by Taco Bell. Get ready for a literal and figurative blast!</p>
    </div> 
  </div>

  <div class="tab">
    <input type="radio" id="tab-3" name="tab-group-1">
    <label for="tab-3">Dessert</label>

    <div class="panel">
      <li>A whole red velvet cake</li>
      <li>Rocky road ice cream</li>
      <li>S'mores</li>
    </div> 
  </div>
            
          
!
            
              .tabs {
  position: relative;   
  min-height: 200px; /* This part sucks */
  clear: both;
  margin: 25px 0;
}

.tab {
  float: left;
}
.tab label {
  background: #eee; 
  padding: 10px; 
  border: 1px solid #ccc; 
  margin-left: -1px; 
  position: relative;
  left: 1px;
}

.tab [type=radio] {
  display: none; 
}

.panel {
  position: absolute;
  top: 36px;
  left: 0;
  background: white;
  right: 0;
  bottom: 0;
  padding: 20px;
  border: 1px solid #ccc; 
}

.panel img {
  margin: 0 15px;
  width: 25%;
}

[type=radio]:checked ~ label {
  background: white;
  border-bottom: 1px solid white;
  z-index: 2;
}

[type=radio]:checked ~ label ~ .panel {
  z-index: 1;
}





body {
  background-color: #ddd;
	font-family: Helvetica, Arial, sans-serif;
  font-size: 1.25em;
  line-height: 1.5;
  padding: 20px;
}
p {
  margin-bottom: 15px;
}
.explanation {
  background: lightyellow;
  padding: 2px;
}
            
          
!
999px
Loading ..................

Console