Instantly share code, notes, and snippets.
Created
November 16, 2015 15:21
-
Save Mashpy/8a3576ecb5791f44137b to your computer and use it in GitHub Desktop.
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
/*-----------------------------------------------------------------------------------*/ | |
/* 5. Navigation | |
/*-----------------------------------------------------------------------------------*/ | |
.menu, .menu * { | |
margin:0; | |
padding:0; | |
list-style:none; | |
} | |
.menu { line-height:1.0 } | |
.main-nav { | |
float:right; | |
margin:0 auto; | |
max-width:100%; | |
position:relative; | |
width:auto | |
} | |
.main-navigation .menu ul { | |
padding:10px 0; | |
position:absolute; | |
top:-999em; | |
width:180px; /* left offset of submenus need to match (see below) */ | |
} | |
.main-navigation .menu ul li:first-child { border-top:3px solid #FF8800; } | |
.main-navigation .menu > li > ul:before { | |
content:''; | |
display:block; | |
width:0; | |
height:0; | |
border-left:5px solid transparent; | |
border-right:5px solid transparent; | |
border-bottom:5px solid #ff8800; | |
position:absolute; | |
top:5px; | |
left:10px | |
} | |
.main-navigation .menu ul li { width:100% } | |
.main-navigation .menu li:hover { | |
visibility:inherit; /* fixes IE7 'sticky bug' */ | |
} | |
.main-navigation .menu li { | |
float:left; | |
position:relative | |
} | |
.main-navigation .menu a { | |
display:block; | |
position:relative | |
} | |
.main-navigation .menu li:hover ul, | |
.main-navigation .menu li.sfHover ul { | |
left:0; | |
top:40px; /* match top ul list item height */ | |
width:180px; | |
z-index:100 | |
} | |
.main-navigation ul.menu li:hover li ul, | |
.main-navigation ul.menu li.sfHover li ul { top:-999em } | |
.main-navigation ul.menu li li:hover ul, | |
.main-navigation ul.menu li li.sfHover ul { | |
border:0; | |
padding:0; | |
left:180px; /* match ul width */ | |
top:-3px | |
} | |
.main-navigation ul.menu li li:hover li ul, | |
.main-navigation ul.menu li li.sfHover li ul { top:-999em } | |
.main-navigation ul.menu li li li:hover ul, | |
.main-navigation ul.menu li li li.sfHover ul { | |
left:180px; /* match ul width */ | |
top:-3px | |
} | |
.main-navigation { | |
float:right; | |
font-size:13px; | |
line-height:20px; | |
position:relative; | |
width:auto | |
} | |
.main-navigation a { | |
border-top:3px solid transparent; | |
color:#8b8b8b; | |
font-weight:700; | |
margin:0 12px; | |
padding:12px 0 16px; | |
} | |
.main-navigation a:hover, | |
.current-menu-item a { | |
border-top:3px solid #fff; | |
color:#fff | |
} | |
.main-navigation ul ul a { | |
border-right: none; | |
margin:0; | |
} | |
#navigation { | |
float:left; | |
margin:0; | |
max-width:100%; | |
position:relative; | |
text-transform:uppercase; | |
width:auto | |
} | |
#navigation ul li { | |
float:left; | |
list-style:none; | |
z-index:1000 | |
} | |
.main-navigation ul li ul li a { | |
background:#353535; | |
border:0; | |
padding:10px 20px; | |
line-height:18px | |
} | |
.main-navigation ul li ul li a:hover { | |
background:#1d1d1d; | |
border:0; | |
color:#fff; | |
padding:10px 20px; | |
} | |
.sfHover a { | |
color:#fff | |
} | |
ul.menu ul .sf-sub-indicator { | |
display:block; | |
right:12px; | |
top:9px; | |
position:absolute | |
} | |
.sf-js-enabled li a.sf-with-ul { | |
padding-right:12px; | |
z-index:20 | |
} | |
.sf-js-enabled li ul li a.sf-with-ul { padding-right:20px } | |
.sf-arrows .sf-with-ul:after { | |
content:''; | |
position:absolute; | |
top:18px; | |
right:0; | |
margin-top:0px; | |
height:0; | |
width:0; | |
border:4px solid transparent; | |
border-top-color:#FFF; | |
border-top-color:rgba(255,255,255,.5); | |
-webkit-transition: all 0.25s linear; | |
-moz-transition: all 0.25s linear; | |
transition: all 0.25s linear; | |
} | |
.sf-arrows .sf-with-ul:hover:after { border-top-color:#FFF } | |
.current-menu-item .sf-with-ul:after { border-top-color:#FFF; } | |
.sf-arrows ul .sf-with-ul:after { | |
top:16px; | |
right:5px; | |
border-color:transparent; | |
border-left-color:#fff; | |
} | |
.sf-arrows ul .sf-with-ul:hover:after { border-top-color:rgba(255,255,255,0); } | |
#navigation .menu [class^="fa-"]:before, | |
#navigation .menu [class*=" fa-"]:before { | |
color:#8B8B8B; | |
left:12px; | |
top:15px; | |
position:absolute; | |
z-index:100; | |
-webkit-transition: all 0.25s linear; | |
-moz-transition: all 0.25s linear; | |
transition: all 0.25s linear; | |
} | |
#navigation .menu .current-menu-item[class*=" fa-"]:before { color:#fff } | |
#navigation .menu [class^="fa-"]:hover:before, | |
#navigation .menu [class*=" fa-"]:hover:before { color:#fff } | |
#navigation .menu ul [class^="fa-"]:before, | |
#navigation .menu ul [class*=" fa-"]:before { | |
color:#fff; | |
left:18px; | |
top:13px; | |
} | |
#navigation .menu [class^="fa-"] > a, | |
#navigation .menu [class*=" fa-"] > a { padding-left:18px !important } | |
#navigation .menu ul [class^="fa-"] > a, | |
#navigation .menu ul [class*=" fa-"] > a { padding-left:36px !important } | |
.btn { display: none !important } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment