I'm implementing an expanding menu with 2 links, but for some reason when I expand the menu the height and width properties of my menu items are not working.
Here is my HTML:
function navigation() {
document.getElementById('expandingMenu').style.display = "block";}
#navbutton{
background-color: white;
border-left: 0px solid black;
border-top: 0px solid black;
border-right: 1px solid black;
border-bottom: 1px solid black;
color: blue;
padding: 10px 40px;
}
.subMenu{
background-color: blue;
color: white;
text-decoration: none;
width: 120px;
height: 40px;
text-align: center;
margin-left: 12px;
margin-top: 5px;
}
.hide{
display: none;
}
<nav>
<button onclick="navigation()" id="navbutton">Navigation</button>
<div class="hide" id="expandingMenu" >
<a class="subMenu" href="">-Home -</a>
<a class="subMenu" href="">-Next -</a>
</div>
</nav>