日期:2014-05-16  浏览次数:20710 次

body大于1200px,分辨率为1024*768,显示器视图怎么居中

<style> 
   body {width:1257px;margin:auto;}
   #head{width:1257px;height:102px;background:url(./images/guagua_01.jpg) no-repeat;}
   #menu{width:1257px;height:38px;background:url(./images/banner.jpg) repeat-x;}
   #soso{width:1257px;height:40px;background:url(./images/soso2.jpg) repeat-x;}  
   #banner{width:960px;height:92px; margin:auto;}
 </style>
body大于1200px   显示器打开默认居左,要用什么元素才能居中显示内容?text-align:center用后是文本等内容居中,而不是视图居中。
------解决方案--------------------
这个恐怕只能控制滚动条到中间~
或者定义左边坐标为负值,就是把部分显示内容移出屏幕外不显示