2
如何使左右区域在顶部和底部区域之间对齐?看起来它们虽然具有相同的高度,但并未对齐。请注意,左侧和右侧的div没有相同长度的文本。任何人都可以帮助请求。CSS,如何将两个div之间的两个div像汉堡一样对齐?
HTML
<div id="top_area"></div>
<div class="left_area">I'm left area, which has longer text</div>
<div class="right_area">right area</div>
<div id="bottom_area"></div>
CSS
<style>
#top_area{
width:550px;
height:100px;
background-color: orange;
}
.left_area{
box-sizing: border-box;
display: inline-block;
background-color: #ffcc99;
width:140px;
height:80px;
padding-top:30px;
}
.right_area{
box-sizing: border-box;
display: inline-block;
background-color: #ffcc99;
width:140px;
height:80px;
padding-top:30px;
margin-left: 15%;
}
#bottom_area{
min-height: 80px;
text-align: center;
padding: 10px;
background-color: orange;
width: 550px;
border-radius:5px;
display: block !important;
text-align: left;
vertical-align: bottom;
}
</style>