A Pen by Iaroslav Popov on CodePen.
Created
August 5, 2014 09:58
-
-
Save yarigpopov/c1c235ba9f50cb45a852 to your computer and use it in GitHub Desktop.
A Pen by Iaroslav Popov.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<ul class="tabs"> | |
<li> | |
<div class="tab active"> | |
<a href="#tab1">Option 1</a> | |
</div> | |
<div class="tab-content"> | |
<h2>Heading 1</h2> | |
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt.</p> | |
</div> | |
</li> | |
<li> | |
<div class="tab"> | |
<a href="#tab2">Option 2</a> | |
</div> | |
</li> | |
<li> | |
<div class="tab"> | |
<a href="#tab3">Option 3</a> | |
</div> | |
</li> | |
</ul> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container ul { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
} | |
.tab { | |
background-color: #DDD; | |
position: relative; | |
padding: 10px; | |
margin: 1px; | |
} | |
.tab.active { | |
background-color: #fff; | |
} | |
.tab-content { | |
padding: 15px; | |
} | |
@media (min-width: 768px) { | |
.container ul li { | |
display: block; | |
position: relative; | |
float: left; | |
} | |
.tab-content { | |
position: fixed; | |
float:left; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment