Pergunta

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?

Foi útil?

Solução 4

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;

Outras dicas

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.

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;

please do follow

background:#830703 url('http://ssl.gstatic.com/gb/images/v1_53a1fa6a.png') no-repeat;
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top