<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>请调整浏览器窗口</title> 
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<style>
html,body
{
margin:0; padding:0;border:none; font-size:12px; color:#000000; line-height:180%;
background-color: #f2f6fb;overflow:hidden;
}
#content
{
position:relative;
width:100%;
height:612px;
left:50%;
margin-left:-50%;
}
#left{
float:left;
width:252px;
height:100%;
border: 1px solid #000;
}
#right{
width:768px;
height:100%;
float:right;
border:1px solid #000;
}
</style>
<Script>
function resizeWindow()
{
document.getElementById("content").style.height=document.body.clientHeight-2;
document.getElementById("right").style.width=document.body.clientWidth-256;
}
</script>
</head>
<body onresize="resizeWindow()">
<div id="content">
<div id="left">
左侧
</div>
<div id="right">
右侧
</div>
</div>
</body>
</html>我现在要求浏览器变化窗口大小的时候:#content 底部边线 距离浏览器底部2px #left的宽度固定为252px #right自适应宽度
加了javascript代码好像无效 请问比较通用的做法