March 18, 2012

background image not appear in IE but appears in firefox

Question by Brendan Fernandes

my background images appear in chrome and firefox, but not in IE 8.
my site is www.burodsin.com the first homepage with the logo.

in css background, i added

.bclass:link {
background-image: url('images/buroimagenew.jpg');
position: absolute;
width: 40px;
height: 97px;
display: block;
z-index:12;
 }

Answer by Starx

The problem on your page is that you are defining repeat properties no-repeat on background-image, like this

background-image: url('images/buroimagenew.jpg') no-repeat; 
                                                /* ^ This is NOT a background-image accepted value */

Either separate the properties like

background-image: url('images/buroimagenew.jpg'); 
background-repeat: no-repeat;

Or write the correct shorthand rule.

background: url('images/buroimagenew.jpg') no-repeat; 

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!