div布局中将页面居中的方法

margin: 0 auto;
将边界的上和下设置为0,0 将右和左设置为自动;

别忘了定位模式用相对

position: relative;

posted @ 2008-06-17 11:36  凡的世界  阅读(458)  评论(0编辑  收藏  举报