Problem with selector order

Discussion in 'CSS' started by pitto, Feb 9, 2008.

  1. #1
    I'm currently trying to create a dropdown menu using son of a suckerfish as my guide. I'm using both Firefox 2.0.0.11 and Safari 3.0.4. I'm relatively new to CSS so don't have a broad base of knowledge to draw upon to solve this problem.

    I have html of the form

    <ul id="navigation">
    <li><a href...></a></li>
    <ul>
    <li>...</li>
    .
    .
    .
    </ul>
    <li>...</li>
    </ul>
    etc

    My problem comes in the stylesheet when I try and control the nested unordered lists and the list items. In particular, these rules are not working when I upload the page:

    ul#navigation li ul {
    position: absolute;
    width: 8em;
    left: -999em;
    }

    ul#navigation li:hover ul {
    left: auto;
    }

    If I remove the underlined "li" in the first rule then the rule is obeyed in both browsers so I've been doing this but this isn't an option in the second rule. It seems as though I'm not allowed to list an "li-selector" before the "ul-selector" but I know from all the examples I see on the internet that this should be fine. In fact, there's no way to make the dropdown effect work otherwise. Any ideas? Is it a problem with the browsers that I'm using? It's really driving me nuts so any help would be appreciated.
     
    pitto, Feb 9, 2008 IP
  2. pitto

    pitto Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I figured out my problem so don't worry about it.

    thanks.
    pitto
     
    pitto, Feb 9, 2008 IP