Stackoverflow 的新手。
我有一个没有水平堆叠的三列 div。这是图片:http: //i.stack.imgur.com/IcGUq.png。开发网站链接:http ://wearemoxie.com/haplusd/
我尝试了几种 CSS hack,但无法让 div 水平对齐。想法?
的HTML:
<!--EDITORIAL-->
<div id="editorial-container" >
<div id="editorial">
<div id="content-1">
<p>LEFT</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
<div id="content-2">
<div id="content-2-1">
<p>MIDDLE</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
<div id="content-2-2">
<p>RIGHT</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</div>
</div>
</div>
<!--END EDITORIAL-->
CSS:
/*Editorial*/
#editorial-container{
z-index:999;
white-space: pre-wrap;
margin-top:80px;
position:relative;
width: 100%;
float:left;
}
#content-1 {
float:left;
width:240px;
background:#bfb;
}
#content-2 {
float:right;
width:720px;
}
#content-2-1 {
float:left;
width:480px;
background:#ddf;
}
#content-2-2 {
float:right;
width:240px;
background:#dff;
}