I'm using :hover
to show a make a menu opaque when the mouse hovers over - obviously this doesn't work for touch devices. This fiddle shows what I'm trying to achieve (scroll down to see the transparency). In my full example I'm using checkboxes to drop down the sub-menus, which is working great.
Obviously I can't traverse 'upwards' using CSS, so selecting a checkbox I can't affect the grandparent nav
. Does anyone have any suggestions? Is there some sort of :active
or equivalent that traverses up the DOM?
I'm not sure I'm making myself particularly clear, but any help would be appreciated. I suspect the only solution might be a jquery one?