SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Perth W.A.
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Background images not loading in IE7

    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:

    http://www.countrymechanical.com.au/temp/

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    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?

  3. #3
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Perth W.A.
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Cheers!

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    I tested IE6 too, and the bg images also appear there, so the site looks fine on all.

    Quote Originally Posted by Argent View Post
    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.
    Cheers!
    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:
    http://www.my-debugbar.com/wiki/IETester/HomePage
    (http://ietester.com/)
    http://www.vmware.com/solutions/desktop/
    http://www.parallels.com/products/desktop/pd4wl/
    http://www.microsoft.com/downloads/d...displaylang=en

  5. #5
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,746
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    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)

    Code:
    background:url(fake.jpg)no-repeat
    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.
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  6. #6
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Perth W.A.
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 ;-)

  7. #7
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Perth W.A.
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ryan,
    Thanks for your help, think I have a fix now, please see me reply to ralph above.

  8. #8
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,746
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    It's not called legacy mode Ralph, it's called compatibility mjode

    Glad you got it fixed.
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by RyanReese View Post
    It's not called legacy mode Ralph, it's called compatibility mjode
    Ah yep, thought I had that wrong. Thanks Ryan.

    Off Topic:

    I understand the "compatability" bit, but "mjode"? Hmm, was it invented by some Nordic person?

  10. #10
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,746
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Ah yep, thought I had that wrong. Thanks Ryan.

    Off Topic:

    I understand the "compatability" bit, but "mjode"? Hmm, was it invented by some Nordic person?
    Off Topic:

    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

    It's actually Norwayish
    Always looking for web design/development work.
    http://www.CodeFundamentals.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •