【问题标题】:display: table-cell causing firefox and opera to ignore max-width and max-height propertiesdisplay: table-cell 导致 firefox 和 opera 忽略 max-width 和 max-height 属性
【发布时间】:2012-10-19 02:22:12
【问题描述】:

如果您愿意,请转至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;
}

谢谢

【问题讨论】:

  • 我在上面的链接中看到 Firefox 中的图像高 90 像素...到底是什么没有使用 max-height?

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


【解决方案1】:
.partenaire-logo-wrap img {
max-height: 90px;
-moz-height:90px;
-o-height:90px;
}

如果您想查看这篇文章,我会从这里获取此信息

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-12-04
    • 2011-02-24
    • 1970-01-01
    • 2018-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多