如何使得 <div layer> </div> 在网页居中显示??
<head>
<style>
#layer1{position:absolute;width:200;height:200;left:expression((document.body.clientWidth-this.offsetWidth)/2);top:expression((document.body.clientHeight-this.offsetHeight)/2);background-color:#d2e8ff}
</style>
</head>
<body>
<div id=layer1>
fason
</div>
</body>
放在一个td里
<body>
<table style=width:100%;height:100%>
<tr><td style=text-align:center>
<div.....</div>
</td></tr></table>
table 套 iframe ,iframe放div,绝对坐标随便怎么用,都不会有定位不准的问题了
<style>
.layer{position:absolute;width:200;height:200;background:#0000ff;
left:expression((document.body.clientWidth-this.offsetWidth)/2);
top:expression((document.body.clientHeight-this.offsetHeight)/2);
}
</style>
<div class=layer>
稚鹰网际开发室
</div>