0
這裏是我的標記:爲什麼我的最後一個內嵌塊元素被推下?
#siteMap {
text-align: center;
background-color: #26AAE1;
color: white;
}
.mapSection {
text-align: center;
width: 32%;
display: inline-block;
padding: 0px !important;
margin: 0 !important;
}
.sectionElem {
display: block;
color: white;
}
<div id="siteMap">
<div class="mapSection">
<span style="font-size:20px;font-weight:bold;color:#F15A2A !important;">POWER ON</span>
<a class="sectionElem">Join Now</a>
<a class="sectionElem">Free Trial</a>
<a class="sectionElem">Membership</a>
</div>
<div class="mapSection">
<span style="font-size:20px;font-weight:bold;color:#F15A2A !important;">SERVICES</span>
<a class="sectionElem">Download Our App</a>
<a class="sectionElem">Refer a Friend</a>
<a class="sectionElem">Member Login</a>
</div>
<div class="mapSection" style="top:0">
<span style="font-size:20px;font-weight:bold;color:#F15A2A !important;">SUPPORT</span>
<a class="sectionElem">Map & Directions</a>
<a class="sectionElem">Contact Us</a>
</div>
</div>
第三內嵌塊元件圍繞推下20像素這樣的:
POWER ON SERVICES
SUPPORT
什麼導致最後的inline-block的元素這樣顯示?
添加垂直對齊:頂部;到.mapSection – Liquidchrome