Dropdown menu issue
The problem is, when I hover over the product link on a large screen > 1000px width, the dropdown works and shows the menus but when I reduce the screen width to <1000px and click the product link and dropdown is showing menus, it is also working fine, and now is the problem when I again go to the larger screen, and then hover over the product link, now it's not working, it is only working if I click on the product link. but I want to show dropdown menus using hover over, on screens with a width >1000px. how to solve it
https://codepen.io/hamzacodepen951/pen/mdaNoME
6 Replies
instead of adding inline style with display block toggle a class with it. Inline style will always win with css unless you use !important
the problem is that you have display: none after clicking and it wins with the display: block on the hover in css
I think I have not used inline styling any where
Could you tell me where should I do modifications
here you are adding an inline styles on click
oh got it, I am very new to JS
I copied this code because for now I wanted to work css and html
removing .style would work?
Thank you so much, Mannix
is there any way that for large screens I dont have to click outside to move the chevron icon back to its defualt position, note only for large screens not for small ons.