everyone,
I've created a burger icon using box-shadow for the first time, but for some reason, only the top bar is a hyperlink: http://jsfiddle.net/vq5r0r8j.
Markup: <a href="#menu" class="box-shadow-menu"></a>
CSS:
.box-shadow-menu {
position: relative;
}
.box-shadow-menu:before {
content: "";
position: absolute;
top: 10px;
width: 35px;
height: 4px;
background: white;
box-shadow: 0 10px 0 0 white, 0 20px 0 0 white;
}
Any help resolving this issue would be really appreciated.
Thanks!
you need to set your
a
todisplay:block
becausea
by default is setinline
and you have to give itheight
as well (same as the parent)snippet: