#container {
width: 960px;
margin-left: auto;
margin-right: auto;
height: auto; }
#large_box {
text-align: center;
width: 960px;
margin-left: auto;
margin-right: auto;
height: auto; }
#searchbcid {
position: absolute;
left: 400px;
margin-left: 50px;
top: 280px; }
#createbcid {
position: absolute;
margin-left: 250px;
top: 280px;
left: 550px; }
#loginpos {
position: absolute;
margin-left: 20px;
left: 30px;
top: 280px; }
在我的html中有一个名为container
的div。所有其他div
s被放置在容器内。 另一个div即large_box
其中包含3个其他div
的诸如loginpos
,searchbcid
,createbcid
。如何居中div
但我无法对齐div
large_box
。
我该如何居中对齐它?
请提供您的HTML代码。 – 2013-03-12 10:06:02
提供了一个小提琴 – 2013-03-12 10:12:34
可能重复的[如何在div中居中div - 水平?](http://stackoverflow.com/questions/114543/how-to-center-a-div-in-a-div-水平) – Kara 2013-10-17 20:42:57