Tuesday, February 23, 2010

css tric to set containers height with minimum and auto values

.selector {
width:200px;
min-height:100px;
height:auto !important;
height:500px;
border:1px solid #000000;
padding:5px;
}
when you assign this class to any contaner like div or span, its minimum height is 100px if there is no content, then it is automatically exanded instead of scrolling when loaded content is more. Maximum height is 500px it is for IE browser only.

0 comments: