Tabbed Content
by pphheerroonn
HTML
<style>
.cbTabs {
position: relative;
min-height: 100px;
clear: both;
margin: 25px 0;
}
.cbTab {
float: left;
}
.cbTab label {
background: #f2f2f2;
padding: 10px;
border: 1px solid #f2f2f2;
margin-left: -1px;
position: relative;
left: 1px;
}
.cbTab [type=radio] {
display: none;
}
.tabContent {
position: absolute;
top: 28px;
left: 0;
background: white;
right: 0;
bottom: 0;
padding: 20px;
border: 1px solid #f2f2f2;
}
[type=radio]:checked ~ label {
background: white;
border-bottom: 1px solid white;
z-index: 2;
}
[type=radio]:checked ~ label ~ .tabContent {
z-index: 1;
}
</style>
<div class="cbTabs">
<div class="cbTab">
<input type="radio" id="tab-1" name="tab-group-1" checked>
<label for="tab-1">Tab One</label>
<div class="tabContent">
stuff
</div>
</div>
<div class="cbTab">
<input type="radio" id="tab-2" name="tab-group-1">
<label for="tab-2">Tab Two</label>
<div class="tabContent">
stuff
</div>
</div>
<div class="cbTab">
<input type="radio" id="tab-3" name="tab-group-1">
<label for="tab-3">Tab Three</label>
<div class="tabContent">
stuff
</div>
</div>
</div>
<div class="cbTabs">
<div class="cbTab">
<input type="radio" id="tab-1a" name="tab-group-2" checked>
<label for="tab-1a">Tab One</label>
<div class="tabContent">
stuff
</div>
</div>
<div class="cbTab">
<input type="radio" id="tab-2a" name="tab-group-2">
<label for="tab-2a">Tab Two</label>
<div class="tabContent">
stuff
</div>
</div>
<div class="cbTab">
<input type="radio" id="tab-3a" name="tab-group-2">
<label for="tab-3a">Tab Three</label>
<div class="tabContent">
stuff
</div>
</div>
</div>