June 12, 2018 at 11:01 am #272537
I’m having a terrible time trying to figure out why my drop-down menu system isn’t working based on a “pure css” approach. In using Chrome debugger, I noticed that some of my selectors are being flat out ignored – and it is not because of specificity. The ones in question are actually more specific than the ones that are working fine.
Here is the test code I’m using. At this point I’m just baffled why the selector “nav ul li ul” is being ignored. When I put style=”display:none;” in line at the sub ul tag, it disappears as expected. Please advise, thank you!June 12, 2018 at 11:44 am #272538
Your nesting is off. Remember that the nested
ulshould be inside the
liit is attached to – as a child, not as a sibling.June 12, 2018 at 12:02 pm #272541
Oh my gosh, what a newbie mistake! I completely over looked the fact that I terminated the li tag before adding the ul submenu.
Works as anticipated now, thank you much!
You must be logged in to reply to this topic.