0
問題和問題顯示:在Firefox表溢出父DIV
當使用顯示:表並顯示:表小區到垂直對齊一個元件,火狐溢出父容器寬度。查看現場演示來檢查代碼。
HTML
<div class="hew storeloader" href="/stores/arti-zen-eskilstuna-city">
<div class="holder hp100" style="height: 325px;">
<div class="storecontent">
<img alt="" src="/img/logo-white.svg">
<p>Arti.Zen Eskilstuna City</p>
</div>
</div>
</div>
CSS
section.stores .storeloader {
width: 47.82609%;
float: left;
margin-right: 4.34783%;
display: inline;
overflow: hidden;
background: #000;
color: #FFF;
text-align: center;
margin: 10px 0;
position: relative;
cursor: pointer;
section.stores .storeloader .holder {
width: 100%;
display: table;
}
section.stores .storeloader .holder .storecontent {
display: table-cell;
padding: 0 10px;
text-align: center;
vertical-align: middle;
text-transform: capitalize;
font-size: 20px;
}
它在Chrome工作在這裏很好的容器上解決。你能告訴我們一個Firefox的預覽? –
和Firefox上。 –
使用'display:table'在容器上'table-layout:fixed;'解決。 – user1885523