开发者

how to use auto with a height in css

开发者 https://www.devze.com 2023-01-19 01:21 出处:网络
How would you use auto height? I need the hight to be 250px default the auto is working but i cant g开发者_如何学Cet a default hight.Perhaps min-height is what you are looking for ?Maybe min-height ?

How would you use auto height? I need the hight to be 250px default the auto is working but i cant g开发者_如何学Cet a default hight.


Perhaps min-height is what you are looking for ?


Maybe min-height ?

As Brian Scott rightly said, min-height is not implemented in IE6, so you could use a JavaScript expression (see this blog article).

* html div#mydiv { 
   height: expression( this.scrollHeight > 249 ? "250px" : "auto" ); 
}

div#mydiv {
  min-height: 250px;
}
0

精彩评论

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