1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Vanishing div background image behind horizontal ul

Discussion in 'CSS' started by JamieC, Nov 15, 2005.

  1. #1
    Hey,
    SEMrush
    I'm having a bizarre CSS problem at the moment. I have a couple of nested divs with a ul inside them, in which i've floated the lis to create a horizontal list.

    It displays perfectly in Firefox, but for some reason, in IE the background of the div behind the ul is obscured. Strange as there isn't anything in the ul which should cause this!

    Even stranger - if I apply a border to the div with the obscured background, the background reappears!

    The link is www.jamiecon.net/v3/.

    If you take a look at the code, note the commented line in the CSS file with the red border - if that line is uncommented, the problem goes away.

    Weird!

    Any help appreciated,

    Jamie
     
    JamieC, Nov 15, 2005 IP
    SEMrush
  2. draculus

    draculus Peon

    Messages:
    63
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add:

    BACKGROUND-IMAGE: url(menu-back.gif);

    to the definition of #nav ul li or #nav ul li a.
     
    draculus, Nov 18, 2005 IP
  3. JamieC

    JamieC Well-Known Member

    Messages:
    226
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #3
    Yeah didn't think of that!

    Still i'd love to know why IE is making the li elements block the div background...
     
    JamieC, Nov 18, 2005 IP
  4. dj1471

    dj1471 Well-Known Member

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    116
    #4
    Setting:

    background-color: transparent;

    for #nav ul li & #nav ul li a might do the trick.

    IE does silly things like this because it's broken... :rolleyes:
     
    dj1471, Nov 18, 2005 IP
  5. draculus

    draculus Peon

    Messages:
    63
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    background-color: transparent; doesn't do it.

    I get the same behaviour on the page for IE and FF.
     
    draculus, Nov 18, 2005 IP
  6. dj1471

    dj1471 Well-Known Member

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    116
    #6
    hmmm. Have you tried adding:
    
    background-repeat: repeat;
    
    Code (css):
    to #nav?
     
    dj1471, Nov 18, 2005 IP