Skip to content

Instantly share code, notes, and snippets.

@JGallardo
Created May 8, 2013 18:45
Show Gist options
  • Save JGallardo/5542631 to your computer and use it in GitHub Desktop.
Save JGallardo/5542631 to your computer and use it in GitHub Desktop.
Default styling for navigation bar in the Foundation 4 framework.
.top-bar {
overflow: hidden;
height: 45px;
line-height: 45px;
position: relative;
background: rgb(35, 43, 45); }
.top-bar ul {
margin-bottom: 0;
list-style: none; }
.top-bar .row {
max-width: none; }
.top-bar form,
.top-bar input {
margin-bottom: 0; }
.top-bar input {
height: 2.45em; }
.top-bar .button {
padding-top: .5em;
padding-bottom: .5em;
margin-bottom: 0; }
.top-bar .title-area {
position: relative; }
.top-bar .name {
height: 45px;
margin: 0;
font-size: 16px; }
.top-bar .name h1 {
line-height: 45px;
font-size: 1.0625em;
margin: 0; }
.top-bar .name h1 a {
font-weight: bold;
color: white;
width: 50%;
display: block;
padding: 0 15px; }
.top-bar .toggle-topbar {
position: absolute;
right: 0;
top: 0; }
.top-bar .toggle-topbar a {
color: white;
text-transform: uppercase;
font-size: 0.8125em;
font-weight: bold;
position: relative;
display: block;
padding: 0 15px;
height: 45px;
line-height: 45px; }
.top-bar .toggle-topbar.menu-icon {
right: 15px;
top: 50%;
margin-top: -16px;
padding-left: 40px; }
.top-bar .toggle-topbar.menu-icon a {
text-indent: -48px;
width: 34px;
height: 34px;
line-height: 33px;
padding: 0;
color: white; }
.top-bar .toggle-topbar.menu-icon a span {
position: absolute;
right: 0;
display: block;
width: 16px;
height: 0;
-webkit-box-shadow: 0 10px 0 1px white, 0 16px 0 1px white, 0 22px 0 1px white;
box-shadow: 0 10px 0 1px white, 0 16px 0 1px white, 0 22px 0 1px white; }
.top-bar.expanded {
height: auto;
background: transparent; }
.top-bar.expanded .title-area {
background: #111111; }
.top-bar.expanded .toggle-topbar a {
color: #888888; }
.top-bar.expanded .toggle-topbar a span {
-webkit-box-shadow: 0 10px 0 1px #888888, 0 16px 0 1px #888888, 0 22px 0 1px #888888;
box-shadow: 0 10px 0 1px #888888, 0 16px 0 1px #888888, 0 22px 0 1px #888888; }
.top-bar-section {
left: 0;
position: relative;
width: auto;
-webkit-transition: left 300ms ease-out;
-moz-transition: left 300ms ease-out;
transition: left 300ms ease-out; }
.top-bar-section ul {
width: 100%;
height: auto;
display: block;
background: #333333;
font-size: 16px;
margin: 0; }
.top-bar-section .divider {
border-bottom: solid 1px #4d4d4d;
border-top: solid 1px #1a1a1a;
clear: both;
height: 1px;
width: 100%; }
.top-bar-section ul li > a {
display: block;
width: 100%;
padding: 12px 0 12px 15px;
color: white;
font-size: 0.8125em;
font-weight: bold;
background: #333333; }
.top-bar-section ul li > a:hover {
background: #2b2b2b; }
.top-bar-section ul li > a.button {
background: #2ba6cb;
font-size: 0.8125em; }
.top-bar-section ul li > a.button:hover {
background: #2284a1; }
.top-bar-section ul li > a.button.secondary {
background: #e9e9e9; }
.top-bar-section ul li > a.button.secondary:hover {
background: #d0d0d0; }
.top-bar-section ul li > a.button.success {
background: #5da423; }
.top-bar-section ul li > a.button.success:hover {
background: #457a1a; }
.top-bar-section ul li > a.button.alert {
background: #c60f13; }
.top-bar-section ul li > a.button.alert:hover {
background: #970b0e; }
.top-bar-section ul li.active a {
background: #2b2b2b; }
.top-bar-section .has-form {
padding: 15px; }
.top-bar-section .has-dropdown {
position: relative; }
.top-bar-section .has-dropdown > a:after {
content: "";
display: block;
width: 0;
height: 0;
border: solid 5px;
border-color: transparent transparent transparent rgba(255, 255, 255, 0.5);
margin-right: 15px;
margin-top: -4.5px;
position: absolute;
top: 50%;
right: 0; }
.top-bar-section .has-dropdown.moved {
position: static; }
.top-bar-section .has-dropdown.moved > .dropdown {
visibility: visible; }
.top-bar-section .dropdown {
position: absolute;
left: 100%;
top: 0;
visibility: hidden;
z-index: 99; }
.top-bar-section .dropdown li {
width: 100%; }
.top-bar-section .dropdown li a {
font-weight: normal;
padding: 8px 15px; }
.top-bar-section .dropdown li.title h5 {
margin-bottom: 0; }
.top-bar-section .dropdown li.title h5 a {
color: white;
line-height: 22.5px;
display: block; }
.top-bar-section .dropdown label {
padding: 8px 15px 2px;
margin-bottom: 0;
text-transform: uppercase;
color: #555555;
font-weight: bold;
font-size: 0.625em; }
.top-bar-js-breakpoint {
width: 58.75em !important;
visibility: hidden; }
.js-generated {
display: block; }
@media only screen and (min-width: 58.75em) {
.top-bar {
background: rgb(35, 43, 45);;
*zoom: 1;
overflow: visible; }
.top-bar:before, .top-bar:after {
content: " ";
display: table; }
.top-bar:after {
clear: both; }
.top-bar .toggle-topbar {
display: none; }
.top-bar .title-area {
float: left; }
.top-bar .name h1 a {
width: auto; }
.top-bar input,
.top-bar .button {
line-height: 2em;
font-size: 0.875em;
height: 2em;
padding: 0 10px;
position: relative;
top: 8px; }
.top-bar.expanded {
background: rgb(35, 43, 45); }
.contain-to-grid .top-bar {
max-width: 62.5em;
margin: 0 auto; }
.top-bar-section {
-webkit-transition: none 0 0;
-moz-transition: none 0 0;
transition: none 0 0;
left: 0 !important; }
.top-bar-section ul {
width: auto;
height: auto !important;
display: inline; }
.top-bar-section ul li {
float: left; }
.top-bar-section ul li .js-generated {
display: none; }
.top-bar-section li a:not(.button) {
padding: 0 15px;
line-height: 45px;
background: rgb(35, 43, 45); }
.top-bar-section li a:not(.button):hover {
background: black; }
.top-bar-section .has-dropdown > a {
padding-right: 35px !important; }
.top-bar-section .has-dropdown > a:after {
content: "";
display: block;
width: 0;
height: 0;
border: solid 5px;
border-color: rgba(255, 255, 255, 0.5) transparent transparent transparent;
margin-top: -2.5px; }
.top-bar-section .has-dropdown.moved {
position: relative; }
.top-bar-section .has-dropdown.moved > .dropdown {
visibility: hidden; }
.top-bar-section .has-dropdown:hover > .dropdown, .top-bar-section .has-dropdown:active > .dropdown {
visibility: visible; }
.top-bar-section .has-dropdown .dropdown li.has-dropdown > a:after {
border: none;
content: "\00bb";
margin-top: -7px;
right: 5px; }
.top-bar-section .dropdown {
left: 0;
top: auto;
background: transparent; }
.top-bar-section .dropdown li a {
line-height: 1;
white-space: nowrap;
padding: 7px 15px;
background: #1e1e1e; }
.top-bar-section .dropdown li label {
white-space: nowrap;
background: #1e1e1e; }
.top-bar-section .dropdown li .dropdown {
left: 100%;
top: 0; }
.top-bar-section > ul > .divider {
border-bottom: none;
border-top: none;
border-right: solid 1px #2b2b2b;
border-left: solid 1px black;
clear: none;
height: 45px;
width: 0px; }
.top-bar-section .has-form {
background: #111111;
padding: 0 15px;
height: 45px; }
.top-bar-section ul.right li .dropdown {
left: auto;
right: 0; }
.top-bar-section ul.right li .dropdown li .dropdown {
right: 100%; } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment