我有一个关于css风格的问题,我想将max-height设置为outer。当我只设置高度时,它工作正常,但是当我想将其设置为最大高度时,内部的内容消失。将div风格设置为最大高度
你可以在这里的例子:http://sara.hil.ch/grega/example5.html
有什么建议?
//outer div style
div.dogodkiinhalt {
position: relative;
top: 0px;
left: 0px;
width: 400px;
padding-bottom: 0px;
background: blue;
border: none;
overflow: auto;
visibility: visible;
height: 200px;
}
//inner div style
#inhaltbox {
position: absolute;
top: 0px;
overflow: hidden;
width: 400px;
height: 200px;
display: none;
display: block;
}
使用both:height和max-height。它工作正常 – Hadas 2012-02-07 15:25:31
这是在发生什么浏览器? – 2012-02-07 15:28:56
在mac或win上的firefox上它是一样的。 – greg 2012-02-07 17:45:06