IE wont display double Background image

Discussion in 'CSS' started by samieis, Oct 12, 2011.

  1. #1
    Hi,

    I am losing my mind trying to figure this out. I have a double bg image and it wont work in ie

    Here is the CSS

    body {
    font:9pt Helvetica, Arial, Tahoma, sans-serif;
    background-image: url(../images/blackbar.gif), url(../images/white_texture.gif);
    background-repeat: repeat-x, repeat;
    margin:0;
    padding:0;
    width:100%;

    }

    Is there something I am missing here?
     
    samieis, Oct 12, 2011 IP
  2. yho_o

    yho_o Well-Known Member

    Messages:
    354
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    #2
    i think your html file, does not have a Doctype, try to specify your Doctype and see what will happen
     
    yho_o, Oct 12, 2011 IP
  3. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #3
    Which version of IE? This is a modern technique that IE only recently started working with (but has been in every other browser for years).
     
    drhowarddrfine, Oct 12, 2011 IP
  4. samieis

    samieis Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It does not work in IE8 and below....is there a way to have a double image that reads in ie 7 & 8?
     
    samieis, Oct 12, 2011 IP
  5. Cameljourney

    Cameljourney Prominent Member

    Messages:
    1,731
    Likes Received:
    107
    Best Answers:
    0
    Trophy Points:
    300
    #5
    Probably the easiest way is just add an extra <div> wrapper after the body and stye that div in css.

    
    
    <body>
      <div class="extraBG">
       
       .................
       
      </div>
    </body>
    
    
    
    Code (markup):

    Or alternatively you can use some jQuery plugins to handle it.
     
    Cameljourney, Oct 13, 2011 IP
  6. you-me

    you-me Peon

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    include ie 9 with compatibility tag.
     
    you-me, Oct 13, 2011 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    OF course it doesn't, multiple backgrounds is CSS3... IE8 and lower don't even know what that is.

    IF you care about supporting IE8/lower, Cameljourney has it right in that you'll need an extra container... though if you could show us the images you are trying to overlay, it could be you're just over-thinking your layout. (which as a rule of thumb is most always the case when people go to things like multiple backgrounds -- see that cicada background nonsense that makes websites suck down gigs of RAM and impossible to scroll)
     
    deathshadow, Oct 15, 2011 IP