I am trying to make a header that contains menu with sub-menu
If the user hovers one of menu in the header, the sub-menu should be opened below of it.
Here is the example I have recreated.
The problem is when one of the menu gets hovered, rest of sub-menu is also appeared as well.
How can I make only one sub-menu opened that belongs to the menu gets hovered using css?
2
Answers
edit: just move overflow:hidden from the class .menu to .sub-menu
check my sandbox
Checkout this sendbox – https://codesandbox.io/s/heuristic-panna-qhwp2r
You can update your CSS slightly as shown below