Follow @Lusse3 (131 followers)

Flickr Recent Photos

Fika dags :-)Liams första fotbollsmatch. :-)Liams första tunnelbana åk. Självklart smockfullt. :-)Otrolig trevlig kväll med @plingplongen och hanna. Fast här ser vi lite seriösa ut. :-)Glömt att lägga upp bild på våran fina framsida. :-)Liam kör och ilia övervakar. :-)SoooommarMums!! Arkham expansion. :-)Dags för whiskyn.IMAG0282IMAG0283IMAG0284

Categories

IE7 CSS Background not showing

Sometimes backgrounds will be visible using firefox but not IE7 which makes you wonder…. why?

The reason is pretty simple. CSS needs to be perfect for IE to understand them.

A perfect example would be.

body{

background:#fff url(picture.jpg)no-repeat;

}

That piece of CSS will work on Firefox but not on IE7 (funny thing is that it MIGHT work on IE7 but it wont most of the time)

body{

Background-image:url('image.jpg');
Background-repeat:no-repeat;
Background-color:#fff;

}

This will on the other hand work. As you can see, they have the same content, just a different layout.

You can of course put it in one row but make sure to have the right format, otherwise you’ll still have the same problem.

body{

background:#fff url(picture.jpg) no-repeat;

}

As you can see, the only difference is the space between “.jpg)” and “no-repeat”

Try this page with both Firefox and IE7 and you’ll see that IE7 won’t show the background, but Firefox will.

6 comments to IE7 CSS Background not showing

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Additional comments powered by BackType