I have a problem with the :hover selector in CSS not changing the display of another section. When I hover over the list items, they change color which is what I want, but they should also make the sub-menu appear.
When the 'list item' with id of #men is hovered over, it should change the display of the section with id #men_submenu from "display:none" to "display:block." This should happen for both 'men,' 'women' and 'youth.'
This is how they are normally displayed:
#men_submenu {
padding-top: 48px;
position: absolute;
display: none;
}
#women_submenu {
padding-top: 48px;
position: absolute;
display: none;
}
#youth_submenu {
padding-top: 48px;
position: absolute;
display: none;
}
This is what the display should change to, when the corrosponding list item is hovered over
#men:hover #men_submenu {
display: block;
}
#women:hover #women_submenu {
display: block;
}
#youth:hover #youth_submenu {
display: block;
}
I have separated the CSS in question at the bottom of the CSS section in JSFIDDLE
Here is the HTML and CSS in JSFIDDLE: http://jsfiddle.net/RBlair/907twm7m/1/
I am not currently worried about how it looks, just as long as it makes the sub-menu display, Thanks a lot!