我有一個關於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