让固定宽度的页面居中
为了让页面在浏览器居中显示, 需要相对定位外层div,然后把margin设置为auto。
#wrapper {
margin: auto;
position: relative;
}
本文来自: 站长网(www.admin5.com) 详细出处参考:http://www.admin5.com/article/20080320/76794.shtml
让固定宽度的页面居中
为了让页面在浏览器居中显示, 需要相对定位外层div,然后把margin设置为auto。
#wrapper {
margin: auto;
position: relative;
}
本文来自: 站长网(www.admin5.com) 详细出处参考:http://www.admin5.com/article/20080320/76794.shtml
| CSS网页布局的意义与副作用 | [9.13] |
| 几个经典的css技巧 | [8.23] |
| CSS清除浮动的三个方法 | [8.23] |
| 背景图片设置对CSS渲染效率的研究 | [8.22] |
| !important在ie7.0的hack方法(三原色加精) | [7.10] |