开发者

Max div height in Internet Explorer

How can I have a 开发者_运维知识库div of static 60px height in Internet Explorer?


<div style="height: 60px; overflow: hidden;">Hello, World</div>

Some versions of IE don't follow max-height, unfortunately, and that's where overflow: hidden comes in handy. Note that the div will ALWAYS have 60px height no matter what's inside it.


#el {
    height:expression(this.scrollHeight>59?"60px":"auto");     
}


<div style="height: 60px;">This is my div</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜