JSFiddle - React, Tailwind, and code Playground
by andi msc
HTML
<h1>Example</h1>
<p>Grade: Depends</p>
<p>This example is the only one that works in IE 7+, so that's big bonus points.</p>
<div id="ie-test">
<ul id="boxLinks" class="group">
<li><a href="#box1">Tab 19</a></li>
<li><a href="#box2">Tab 20</a></li>
<li><a href="#box3">Tab 21</a></li>
</ul>
<div id="box">
<div id="box1" class="box">
<ul>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
<li>Vestibulum auctor dapibus neque.</li>
</ul>
<!--[if IE]><b>.</b><![endif]-->
</div>
<div id="box2" class="box">Another box! <!--[if IE]><b>.</b><![endif]--></div>
<div id="box3" class="box">Woot! <!--[if IE]><b>.</b><![endif]--></div>
</div>
</div>
CSS
* { margin: 0; padding: 0; }
#page-wrap { width: 960px; margin: 100px auto; }
h1 { font: 36px Georgia, Serif; margin: 20px 0; }
.group:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
p { margin: 0 0 10px 0; }
.tabs { list-style: none; }
.tabs li { display: inline; }
.tabs li a { color: black; float: left; display: block; padding: 4px 10px; margin-left: -1px; position: relative; left: 1px; background: white; text-decoration: none; }
.tabs li a:hover { background: #ccc; }
/* Generic styles & example one */
.tabbed-area { margin: 0 0 120px 0; }
.box-wrap { position: relative; min-height: 250px; }
.tabbed-area div div { background: white; padding: 20px; min-height: 250px; position: absolute; top: -1px; left: 0; width: 100%; }
.tabbed-area div div, .tabs li a { border: 1px solid #ccc; }
#box-one:target, #box-two:target, #box-three:target { z-index: 1; }
/* Stuff for example two */
.cur-nav-fix { margin-top: 60px; }
.cur-nav-fix .tabs { position: absolute; bottom: 100%; left: -1px; }
.cur-nav-fix .tabs li a { background: -moz-linear-gradient(top, white, #eee); }
#box-four { z-index: 1; }
#box-four:target .tabs,
#box-five:target .tabs,
#box-six:target .tabs { z-index: 3; }
#box-four:target, #box-five:target, #box-six:target { z-index: 2; }
.cur-nav-fix .tabs li.cur a { border-bottom: 1px solid white; background: white; }
/* Stuff for example three */
.cur-nav-fix-2 .tabs li a { background: -moz-linear-gradient(top, white, #eee); }
.cur-nav-fix-2 .tabs { z-index: 2; position: relative; }
#box-seven:target .box-seven,
#box-eight:target .box-eight,
#box-nine:target .box-nine { z-index: 1; }
...