Skip to content

Instantly share code, notes, and snippets.

@tareq1988
Created December 7, 2012 11:02
Show Gist options
  • Save tareq1988/4232535 to your computer and use it in GitHub Desktop.
Save tareq1988/4232535 to your computer and use it in GitHub Desktop.
Navigation menu with LESS
@borderColor: #eee;
.main-navigation {
clear: both;
display: block;
float: left;
width: 100%;
border-top: 1px solid @borderColor;
border-left: 1px solid @borderColor;
border-right: 1px solid @borderColor;
ul {
list-style: none;
margin: 0;
padding-left: 0;
ul {
-moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
box-shadow: 0 3px 3px rgba(0,0,0,0.2);
display: none;
float: left;
position: absolute;
top: 2em;
left: 0;
z-index: 99999;
background: #fff;
a {
width: 200px;
&:hover {
}
}
ul {
left: 100%;
top: 0;
}
li {
border-bottom: 1px solid @borderColor;
border-right: none;
}
&:hover > a {
}
}
li:hover > ul {
display: block;
}
}
li {
float: left;
position: relative;
border-right: 1px solid @borderColor;
&:hover > a {
}
&.current_page_item a {
}
&.current-menu-item a {
background: @borderColor;
}
}
a {
display: block;
text-decoration: none;
padding: 5px 10px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment