Background image not displaying on old IE versions

8.3k views Asked by At

I m really having a hard time displaying a background image on old IE versions (6-8).

Here is my code:

#top
{
background-image: url(http://some-domain.com/myimage.jpg) no-repeat;
background-color:#830703;
border-bottom: 1px solid #303130;
height: 128px;
width:100%;
overflow: hidden;
zoom:1;
}

I have tried it to write it in many different ways but it didn't work.

Does anyone have an idea?

4

There are 4 answers

5
Ria Weyprecht On BEST ANSWER

This should actually never show up correctly as you have a small syntactical error. you mixed background-image and background-repeat. Either use the background-shortcut or just split them up:

background-image: url(http://some-domain.com/myimage.jpg);
background-repeat: no-repeat;
9
Nitesh On

Use the below.

#top
{
    background: url(http://some-domain.com/myimage.jpg) no-repeat #830703;
    border-bottom: 1px solid #303130;
    height: 128px;
    width:100%;
    overflow: hidden;
    zoom:1;
}

Hope this helps.

2
Sowmya On

Use either one of the below

background-image: url(http://some-domain.com/myimage.jpg) no-repeat;
background-color:#830703;
background-repeat: no-repeat;

or

background: url(http://some-domain.com/myimage.jpg) no-repeat #830703;
1
Sathish RG On

please do follow

background:#830703 url('http://ssl.gstatic.com/gb/images/v1_53a1fa6a.png') no-repeat;