HTML & CSS
IE7 apparently doesn't render background images written with the 'background' property in CSS.
Can anyone help with a hack for IE 7 to make it show background images?
AND IE6 for that matter
Any help appreciated.
Site in question:
It's not called legacy mode Ralph, it's called compatibility mjode
Glad you got it fixed.
[ot]I saw that typo before I submittted my reply, and I decided to let it run just so I'd see if anything came of it :rofl:
It's actually Norwayish[/ot]
Many thanks! that's encouraging!
I'm testing for my client who has IE7.
It would be handy if I could put IE6 and 7 on my PC for testing - I tried to download IE7 but because I had IE8 already installed it wouldn't allow me to install 7. Any ideas on how I can test on IE 6 and 7.
Hi, if background images aren't appearing in all of IE, then I know what the error is, and it's easiliy fixed (you probably forgot a space (example below)
There isn't a space there and IE will ignore the rule
If it is just IE7, then try adding haslayout to that element because sometimes IE needs it, min-height:0 for example.
Bg images show up fine in IE6 and 7. Just tested your site in ie7 and it looks just like FF.
Have you done a page refresh, cleared cash etc?
Thanks for your help, think I have a fix now, please see me reply to ralph above.
Thanks again for your help, including the links. It seems it's working now.
I did swap from 'background:' to 'background-image:' as well as 'background-repeat:' and 'background-position' etc. I think this may have made the difference.
I tested for IE7 at www.browsershots.org and the site rendered just fine.
Time to call it a fix I think
I tested IE6 too, and the bg images also appear there, so the site looks fine on all.
IE8 has a feature called something like "legacy mode" (I can't remember, as I haven't used it) which lets you view a page as IE7 would render it.
Other than that, you could install a virtual machine which will allow you to run multiple versions of IE, such as:
Ah yep, thought I had that wrong. Thanks Ryan.
I understand the "compatability" bit, but "mjode"? Hmm, was it invented by some Nordic person? :lol: