Forums

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

Home Forums CSS Very weird IE6 bug – background image won’t show

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24331
    daGUY
    Member

    This is one of the stranger IE bugs I’ve seen…

    Go to my site. See the little white carat underneath my name that connects it with the page content below? Now go to Portfolio or Articles – the carat changes to grey to blend in with the submenu.

    The way I do this is very simple – I have two different classes, each specifying a different image, and I apply the one I need for that page to the #header div:

    Code:
    Code:
    .root {
    background: url(‘images/carat_white_up.jpg’) center bottom no-repeat;
    }
    .submenu {
    background: url(‘images/carat_grey_up.jpg’) center bottom no-repeat;
    }

    Here’s the IE6 bug. Originally, I wrote the CSS like this:

    Code:
    #header.root {
    background: url(‘images/carat_white_up.jpg’) center bottom no-repeat;
    }
    #header.submenu {
    background: url(‘images/carat_grey_up.jpg’) center bottom no-repeat;
    }

    If I do that, IE6 will not display the .submenu image. It just won’t do it. Every other browser (including IE7 and up) will, like it should.

    That has to be a legit bug, right? That makes absolutely no sense. Anyone ever encounter this before? :shock:

    #54907
    Chris Coyier
    Keymaster

    I’m sure it’s this:

    #header.submenu

    That’s a selector that has both an ID and a class on it… I almost never ever do that, and I can’t even remember why, but now that you bring this up, I’m sure it’s because IE 6 just doesn’t recognize selectors like that.

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