开发者

how to use auto with a height in css

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜