Created
December 16, 2011 06:24
-
-
Save jacine/1484786 to your computer and use it in GitHub Desktop.
Drupal - Primary and secondary tabs.
This file contains 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
/** | |
* Drupal - Primary and secondary tabs. | |
*/ | |
ul.tabs { | |
border-bottom: solid 1px #ddd; | |
display: block; | |
margin: 0 0 20px 0; | |
padding: 0; | |
} | |
.tabs li { | |
display: block; | |
float: left; | |
height: 30px; | |
margin-bottom: 0; | |
padding: 0; | |
} | |
/* Primary tabs */ | |
.primary li a { | |
background: #f5f5f5; | |
border: solid 1px #ddd; | |
border-width: 1px 1px 0 0; | |
display: block; | |
height: 29px; | |
line-height: 30px; | |
margin: 0; | |
padding: 0px 20px; | |
} | |
.primary li a.active { | |
background: #fff; | |
border-left-width: 1px; | |
border-radius: 2px 2px 0 0; | |
color: #111; | |
height: 30px; | |
margin: 0 0 0 -1px; | |
padding-top: 4px; | |
position: relative; | |
top: -4px; | |
} | |
.primary li:first-child a.active { | |
margin-left: 0; | |
} | |
.primary li:first-child a { | |
border-width: 1px 1px 0 1px; | |
border-radius: 2px 0 0 0; | |
} | |
.primary li:last-child a { | |
border-radius: 0 2px 0 0; | |
} | |
/* Secondary tabs */ | |
.secondary { | |
font-size: 95%; | |
} | |
.secondary li { | |
padding: 0 10px; | |
} | |
/* Clearfix */ | |
ul.tabs:before, | |
ul.tabs:after { | |
content: "\0020"; | |
display: block; | |
height: 0; | |
overflow: hidden; | |
visibility: hidden; | |
width: 0; | |
} | |
ul.tabs:after { | |
clear: both; | |
} | |
ul.tabs { | |
zoom: 1; | |
} | |
body { | |
font-family: sans-serif; | |
padding: 2em; | |
} | |
a { | |
text-decoration: none; | |
} |
This file contains 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
<nav class="tabs" role="navigation"> | |
<ul class="tabs primary" aria-label="Primary tabs"> | |
<li><a href="#">First</a></li> | |
<li><a href="#">Second</a></li> | |
<li class="active"><a href="#" class="active" aria-label="(active tab)">Third</a></li> | |
<li><a href="#">Fourth</a></li> | |
</ul> | |
<ul class="tabs secondary" aria-label="Secondary tabs"> | |
<li><a href="#">One</a></li> | |
<li><a href="#">Two</a></li> | |
<li><a href="#">Three</a></li> | |
<li><a href="#">Four</a></li> | |
<li><a href="#">Five</a></li> | |
</ul> | |
</nav> |
This file contains 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
{"view":"separate","prefixfree":"1","page":"result"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment