开发者

Why are my images not displaying in IE?

It seems IE is choosing to ignore my background images :(, its getting all the styles with layout etc but not sure where I have gone wrong

开发者_如何转开发

This is the [link removed]

css example body { background:#eae3e3 url(styles/images/bg.jpg)no-repeat center 0; }


You have an error in your CSS file that IE can't interpret. When you attach the background image to body, you forgot to put a space between the last ) in your image reference and your 'no-repeat' statement.

So change this:

background:#eae3e3 url(styles/images/bg.jpg)no-repeat center 0;

To this:

background:#eae3e3 url(styles/images/bg.jpg) no-repeat center 0;

I tested this in the IE debugger and it does, in fact, fix the problem.


You have a missing space after url():

background:#eae3e3 url(styles/images/bg.jpg)no-repeat center 0;     

Make that

background:#eae3e3 url(styles/images/bg.jpg) no-repeat center 0;

and it should work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜