How can I make both the menu item and its icon clickable as a link? When either is clicked, the link should work.
Here is a CodePen example: http://codepen.io/emilychews/pen/wJrqaR
The red square serves as the container for the icon that will be used.
The CSS code is:
CSS
.menu {
position: relative;
left: 50px;
top: 50px;
height: 30px;
width: 100px;
background: blue;
line-height: 30px;
text-align: center;
}
.menu:before {
content:'';
position: absolute;
width: 100%;
height: 100%;
background: red;
bottom: 40px;
right: 0px;
}
.menu-item1 a { color: white; text-decoration: none; }
HTML
<div class="menu menu-item1"><a href="//google.com">Menu Item</a></div>
I would appreciate any assistance. Thanks!
Emily.