我完全不知道您在代码中使用的布局,但如果您想要全角页脚和内容为 960px,您可以将布局设置为:
<body>
<div id="header">
<div class="wrapper">
</div>
</div>
<div id="container" class="wrapper">
//your container with 960px width
</div>
<div id="footer">
<div class="wrapper">
</div>
</div>
</body>
<!-- I suggested to have a wrapper in header and footer so that
your text or links or whatever you have could be in 960px width
but your header and footer backgrounds spawns to full-width
-->
和 CSS 将是一些东西:
body { width:100% }
#header, #footer { width:100% }
.wrapper { width:960px }
#footer { clear:both; height:100px; bottom:0; display:block; background-color:#555; }