Skip to content

Instantly share code, notes, and snippets.

@mikedugan
Created November 7, 2013 14:23
Show Gist options
  • Save mikedugan/7355345 to your computer and use it in GitHub Desktop.
Save mikedugan/7355345 to your computer and use it in GitHub Desktop.
Dropdown menu with css
.menu {
list-style: none;
float: left;
position: relative;
}
.menu li {
float: left;
margin-right: 10px;
position: relative;
}
.menu ul {
list-style: none;
position: absolute;
left: -9999px;
background: #fff;
background: rgba(255,255,255,0);
}
.menu a {
display: block;
text-decoration: none;
}
.menu li:hover ul {
left: 0;
}
.menu ul li {
padding-top: 1px;
float: none;
}
.menu ul a {
white-space: nowrap;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment