如何將我的三個div對齊到頂部? - 查看谷歌郵件和谷歌地圖下載內容較少後的效果如何?我希望他們在頂部對齊,不管他們下方有多少文字將頂部對齊並在Div之間創建空間
另外,我有三個div,分別爲33.3333%。 - 如果我希望把更多的空間,其間的div(比如像5px的,我該怎麼做
這裏是我的jsfiddle:http://jsfiddle.net/huskydawgs/Z7dZR/
這裏是我的代碼:
<div id="wrapper-threecol">
<div id="threecol_row">
<div class="threecol_cell1">
<p class="summary-headline">Google Mail</p>
<p class="summary-description">Gmail's inbox helps you stay organized by sorting your mail by type. Plus, you cannot work correctly.</p>
</div>
<div class="threecol_cell2">
<p class="summary-headline">Google</p>
<p class="summary-description">Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.</p>
</div>
<div class="threecol_cell3">
<p class="summary-headline">Google Maps</p>
<p class="summary-description">Find local businesses, view maps and get driving directions in Google Maps.</p>
</div>
</div>
</div>
這裏是我的CSS :
#wrapper-threecol {
position:relative;
width:100%;
border: none;
margin: 20px 0 0 0;
}
#threecol_row {
height:100%;
white-space:nowrap;
}
.threecol_cell1, .threecol_cell2, .threecol_cell3 {
height:100%;
width:33.3333%;
display:inline-block;
white-space:normal;
}
.summary-headline {
color: #232323;
font-family: 'SegoeRegular', Helvetica, Arial, sans-serif;
font-size: 20px;
line-height: 24px;
margin:0;
text-align: center;
}
.summary-description {
color: #232323;
font-family: 'SegoeRegular', Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 23px;
margin: 0;
text-align: center;
}
將它們對齊在單元格頂部'vertical-align:top;' – Huangism