Reputation: 1
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?
Upvotes: 0
Views: 8365
Reputation: 1275
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;
Upvotes: 0
Reputation: 112
please do follow
background:#830703 url('http://ssl.gstatic.com/gb/images/v1_53a1fa6a.png') no-repeat;
Upvotes: 1
Reputation: 26969
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;
Upvotes: 1
Reputation: 15749
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.
Upvotes: 1