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

Home Forums CSS background color missing from drop down in IE7

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #30851

    Hi – I have a drop down menu that looks great everywhere except IE7. The tan background color in the drop down does not take up the full width of the drop down. I am wondering if this is something to do with z-index, or positioning? The site is here.

    You can view the CSS here.


    the only way I could fix it was to change the width: auto to width: 200px; in this rule in the nav.css

    .nav li > ul

    I played with width: 100%; but that did some funky things to the drop down. Maybe with it being your code, you can figure out how to make it work out.

    I am using I.E tester and it works in that. You might have to play around with the values.

    Also I noticed that in your css, you have many places where the last rule is not followed by a semi-colon. While the css does not care that you don’t put it there, it is considered best practice to always follow every rule with a semi-colon. This will save you problems later on if you should forget to add the semi-colon when you go back to add another rule.


    Thanks for pointing out the missing ; in my code! Have fixed those. I did try playing with the width also, but that wasn’t a perfect solution. So, after looking at my code (I have 2 style sheets, one for the nav and one for the main site), I realized I had some duplicate classes and one was over-riding the other. Once I fixed this, it looks good in IE7.

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