我想在页面底部放一个div,并将其宽度设置为960px,在页面的中心,最小的左边框的边距为170px。这是我的代码:css位置:固定溢出:自动
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
</head>
<style type="text/css">
body{width:100%;height:100%;}
*{padding:0;margin:0;}
#wrap{position:fixed;margin:0 auto;margin-left:170px;width:960px;overflow:auto;bottom:0;height:100px;}
</style>
<body>
<div id="wrap">
test test test test test test test test test test test test test test test test test test test test test test test test
</div>
</body>
</html>
但是,当屏幕宽度为1024,该div#wrap
没有滚动,右侧部分不显示。我如何解决它?
我在这里测试它:http://jsfiddle.net/8cxmD/它并没有出现在页面中间。 – jlmakes 2011-01-13 12:38:32
看到我的最新编辑,与HTML和身体的CSS .... – jlmakes 2011-01-13 12:43:27