Forums

[resolved] Background images are not displaying in IE (13 posts)

  1. roner77
    Member
    Posted 2 years ago #

    God I hate IE.

    I created a theme that is working perfectly in Safari, FF and Chrome, but IE won't display any images that are invoked by CSS background styles.

    For instance, I have this for my container:

    #container {
    width:960px;
    overflow:hidden;
    margin:-2px auto;
    background:url(images/container-bg-4.jpg)no-repeat top center;
    position:relative;
    }

    The background shows up in all browsers except IE.

    Anyone know a quick fix for this? Do I need to set the height?

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    does adding ('your image.jpg') help at all?

    the ' and ' inside the ()? I'm not sure how important this is? I just know it's in my css.......

  3. roner77
    Member
    Posted 2 years ago #

    I'm not sure what you mean. I've already added the image through background property. Can you elaborate?

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    the apostrophes (sp?)

    (images/container-bg-4.jpg) is ('images/container-bg-4.jpg')

    like I said, I dunno how important that is....I just know I learned to put them there while learning css.....

  5. roner77
    Member
    Posted 2 years ago #

    Unfortunately that doesn't make it work.

    It's really quite strange. I look in IE8s developer tool at the CSS style for container and it's somehow set to background: none.

    Anyone else have an idea why IE would change the values of my background styles?

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    I'm guessing for more specific help, you should post a link to your site?

    How does it validate? Do you have any errors? You're not missing a closing } in your css anywhere are you?

  7. roner77
    Member
    Posted 2 years ago #

    Here's the link: http://archwebshop.com/

    CSS validates. Thanks for any help you may be able to offer.

  8. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    hmm....your images are all in a folder called images in arch-portfolio right?

    I know thats basic....but your issue strikes me as strange......

    oh, by valid, I didn't just mean the css, I meant your site...

    http://validator.w3.org/check?uri=http%3A%2F%2Farchwebshop.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

  9. roner77
    Member
    Posted 2 years ago #

    I just put this up so I hadn't really gone through it.

    I'll fix those errors but I can't see any affecting the BG properties.

    The images are setup like any other theme. They're in a folder named images and then there's a some sub folders for certain projects I did.

    Thanks for your help. I'll let you know if it's still an issue after fixing all of his errors.

  10. roner77
    Member
    Posted 2 years ago #

    so 90% of those errors that are for closing tag for the php generated wp feeds. The closing tags are in the code and they actually appear in the source for IE as well.

  11. alchymyth
    The Sweeper
    Posted 2 years ago #

    i've seen this before - IE needs a space after the closing bracket of the background image url in the style sheet.
    background:url(images/container-bg-4.jpg) no-repeat top center;

  12. roner77
    Member
    Posted 2 years ago #

    You rock! that's exactly what was wrong.

    I would have never guessed that was the issue...

    thanks a million

  13. Annevita
    Member
    Posted 2 years ago #

    alchymth,

    Thank you, thank you, thank you!!! I spent hours trouble-shooting the same problem, and finally solved it with your fix. I'm very, very grateful!

Topic Closed

This topic has been closed to new replies.

About this Topic