http://codepen.io/willc86/pen/hpFLe为中心的CSS DIV,具有中间
嗨我在上面的代码笔链接,这样你们可以看到它的问题。我很困扰中间盒子的问题。我怎么做。当我不居中,中间的方框似乎有利于一方,当我缩小浏览器的
这是我的代码
#box{
border: 3px solid red;
}
#space{
text-align: center;
}
#leftcolumn {
width: 300px; border: 1px solid red; float: left; margin: 40px;
margin-right: 20px;
}
#rightcolumn {
width: 300px; border: 1px solid red; float: right;
margin: 40px; margin-left: 20px;
}
#mcolumn {
width: 300px; border: 1px solid red; float: left; margin: 40px;
}
.clear {
clear: both;
}
和我的HTML
<div id="box">
<div id="space">
<div id="leftcolumn"><p>LEFT</p></div>
<div id="rightcolumn"><p>RIGHT</p></div>
<div id="mcolumn"><p>mcolomn</p></div>
<div class="clear"></div>
</div>
</div>