function getWidth(){
var w=document.body.clientWidth;
w=(w-800)/2;
return w;
} ////////获得左距离
margin-left:expression(getWidth());//利用CSS表达式居中显示。
传统的消除默认,然后BODY{MARGIN:0 AUTO;}非常不适用,特别当遇到动态页面时出现怪现象。
特别是DIV 是absolute定位时传统方法就失去效用了。
function getWidth(){
var w=document.body.clientWidth;
w=(w-800)/2;
return w;
} ////////获得左距离
margin-left:expression(getWidth());//利用CSS表达式居中显示。
传统的消除默认,然后BODY{MARGIN:0 AUTO;}非常不适用,特别当遇到动态页面时出现怪现象。
特别是DIV 是absolute定位时传统方法就失去效用了。