display:table-cell导致firefox和opera忽略max-width和max-height属性

时间:2012-10-29 18:05:57

标签: css firefox opera vertical-alignment css-tables

如果你愿意去http://debourg-dev.ch/syselcloud/erp-rh/,你会发现在firefox和opera中,图像没有使用max-height属性。这是因为我正在使用display:table-cell来垂直对齐它们,如果我删除display:table-cell它工作正常。如何将这些图像与display:table-cell垂直对齐并获取firefox和opera以使用正确的max-height值?

相关代码是:

.partenaire-logo-wrap {
height: 110px;
text-align: center;
vertical-align: middle;
display: table-cell;
}

.partenaire-logo-wrap img {
max-height: 90px;
}

由于

1 个答案:

答案 0 :(得分:0)

.partenaire-logo-wrap img {
max-height: 90px;
-moz-height:90px;
-o-height:90px;
}

如果您想查看此帖子,我会从此处获取此信息

Max-height ignored in Firefox, works in Chrome and Safari