Background image not showing in IE 6, but other browsers ok

Discussion in 'CSS' started by Mojave, Nov 16, 2007.

  1. #1
    My background just doesn't diplay in IE6, but looks fine firefox, etc.

    Here is the CSS:

    #wrap { background: url(img/bg.png) repeat-x; overflow: hidden; padding: 0px 0px 0px 0px; }

    Am I doing something wrong? Any help would be great.

    thanks
     
    Mojave, Nov 16, 2007 IP
  2. libertygone

    libertygone Active Member

    Messages:
    2,625
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    90
    #2
    your code should look like this:

    #wrap { background: url('img/bg.png') repeat-x; overflow: hidden; padding: 0px 0px 0px 0px; }

    this is what you need to change:

    ('img/bg.png')

    add ' to wrap around the URL

    it should work! :)
     
    libertygone, Nov 16, 2007 IP
  3. Mojave

    Mojave Peon

    Messages:
    145
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hmm didn't seem to work, would it help if I swtitched it to a .gif?
     
    Mojave, Nov 16, 2007 IP
  4. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #4
    Actually it doesn't change a thing. Typing quotes for url()'s is pointless and a waste of typing (unless you do it to differentiate the quoted text in a text editor) and I believe it chokes on IE5/MAC.

    I'm 99.9% sure by that rule that he didn't trigger hasLayout. One of the ways you can do it is like so:

    That or you can set a height of 1% (but will run into overflow problems unless you reset it to visible for ie6 only), zoom and a value, width, and there's more ways to do it but those are the simple triggers.
     
    soulscratch, Nov 16, 2007 IP
  5. Mojave

    Mojave Peon

    Messages:
    145
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks! do you have IE 6? (I don't on the machine I'm on now) Would you mind looking at it if you do? I'll send you the url.
     
    Mojave, Nov 16, 2007 IP
  6. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #6
    Yep, I can see it.
     
    soulscratch, Nov 16, 2007 IP
  7. TroyM

    TroyM Well-Known Member

    Messages:
    520
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #7
    Try it with the following line

    img{position:relative;}


    Thanks
     
    TroyM, Nov 22, 2007 IP
  8. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #8
    ^ background image != image
     
    soulscratch, Nov 22, 2007 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Mac-IE is a dead browser anyway. Stop trying to support it, unless your client/boss tells you to (assuming you like getting paid, that is).

    This does seem to be a hasLayout issue anyway. Mojave, can you please post the full HTML and CSS code for this page your'e working on?
     
    Dan Schulz, Nov 22, 2007 IP
    sundaybrew likes this.
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #10
    Silly question, but is your background an alpha transparent .png? Those won't show in IE properly if at all.

    As to some of the responses so far, like styling image or adding single quotes - just... wow. If you don't know enough CSS to know those do nothing, please... save yourself some time and embarrassment.

    I suspect though that as Dan suggested it's a haslayout issue, or the .png itself is incompatible with IE. Either way we need to see the ACTUAL code, and the ACTUAL image involved to be any real help.
     
    deathshadow, Nov 23, 2007 IP
  11. sundaybrew

    sundaybrew Numerati

    Messages:
    7,294
    Likes Received:
    1,260
    Best Answers:
    0
    Trophy Points:
    560
    #11
    Whats funny or NOT so funny is that I have the same problem and I just searched google and found this thread ..

    Funny huh

    Anyhow

    Instead of making anew thread ,

    Maybe we can kill to birds with one stone :)

    My code


    My page is

    http://plumbingskool.com/copper-pipe/different-grades-of-copper-pipe.html

    It works fine in IE7 and FF , just not in ie 6

    See the water drops ,.....Now look in ie 6

    I hope that "DAn the man " can help us both :)
     
    sundaybrew, Jan 27, 2008 IP
  12. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    #12
    Try:

    .entry ul
    {
    list-style-type: none;
    padding: 0;
    margin: 0;
    position: relative;
    }

    .entry li
    {
    background: url(images/step.jpg) no-repeat 1em;
    padding-left: 60px;
    margin: 1em 0;
    position: relative;
    }
     
    VimF, Jan 27, 2008 IP
  13. sundaybrew

    sundaybrew Numerati

    Messages:
    7,294
    Likes Received:
    1,260
    Best Answers:
    0
    Trophy Points:
    560
    #13
    WOW - AL MOST :)

    I see the images now BUT in IE6 ONLY , I also see black bullets...

    Can you tell me how to rid of them :)

    Thanks again for the first response
     
    sundaybrew, Jan 27, 2008 IP
  14. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Usually .entry ul
    {
    list-style-type: none;

    gets rid of the bullets, but I've had IE6 add them in anyway... so I repeat myself on the li's too:

    .entry li {
    list-style-type: none;
    }

    Not sure why this is, maybe IE6 has in inheritance problem, cause this declaration really does belong on the UL.
     
    Stomme poes, Jan 28, 2008 IP