开发者

Absolute class is not working in IE

I want to put one picture in my website with absolute class in css. I have this CSS:

.christmas-santa {background:url(../images/header/santa.jpg) left bottom no-repeat scroll;
position:fixed; left:0px; top:0px; width:100%; height:100%; border:1px solid #000000;}

This CSS works in Mozila, bu开发者_如何转开发t it's not working properly in IE.

What changes should I make?


Which version of IE? There are known issues with IE6 and position:fixed but here is the fix; http://divinentd.com/experiments/emulating-position-fixed.html

IE7+ will only support position:fixed in standards compliant mode which requires a valid DOCTYPE.

Include this at the top of your page;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">


Which IE are you using? IE 6, 7, and 8 each behavior slightly differently (have different bugs). To start with, IE 6 doesn't support position: fixed. If you google for ie 6 position fixed, you will find workaround to emulate that in IE 6.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜