问题和疑问
当使用display:table和display:table-cell to vertical align a element时,Firefox溢出父容器的宽度.查看实时演示以检查代码.
HTML
Arti.Zen Eskilstuna City
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; }
user1885523.. 5
table-layout: fixed;
使用在容器上解决display: table
table-layout: fixed;
使用在容器上解决display: table