Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS selector being ignored

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #272537
    ZachHandy
    Participant

    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!

    https://codepen.io/t3kn0m0nk3y/pen/Wyjaoo

    #272538
    Beverleyh
    Participant

    Your nesting is off. Remember that the nested ul should be inside the li it is attached to – as a child, not as a sibling.

    #272541
    ZachHandy
    Participant

    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!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.