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?
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.......
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?
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.....
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?
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?
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.
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
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.
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.
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;
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
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!