I am working on a pure CSS hamburger menu icon, so far it's working great, except that the gaps between the lines are not clickable. How can I modify this code so that the entire button is clickable as opposed to just the lines?
<a href="#" title="Open Menu" class="menu"></a>
.menu {
width:30px;
height:5px;
background-color:#000;
position:relative;
display:inline-block;
}
.menu:after, .menu:before {
content: '';
width: 100%;
height:5px;
background-color:#000;
position:absolute;
}
.menu:after {
top:10px;
left:0;
}
.menu:before {
top:20px;
left:0;
}
Here's a JSFiddle.
Thanks!
Just do this
DEMO - 1 (border top or bottom)
DEMO -2 (box-shadow)
DEMO - 3 (only :before or after mixed box-shadow inset)
DEMO - 4
DEMO - 5 (using background image)