Set min/max height or min/max width for DIVs

#div1 {
min-height:700px;
/* Set min-height for all standards-compliant browsers */
height: expression( this.scrollHeight < 701 ? “700px” : “auto” );
/* Set min-height for IE */
}

#div2 {
max-height:700px;
/* Set min-height for all standards-compliant browsers */
height: expression( this.scrollHeight > 699 ? “700px” : “auto” );
/* Set min-height for IE */
}

#div3 {
min-width:700px;
/* Set min-width for all standards-compliant browsers */
width: expression( document.body.clientWidth < 701 ? “700px” : “auto” );
/* Set min-width for IE */
}

#div4 {
max-width:700px;
/* Set max-width for all standards-compliant browsers */
width: expression( document.body.clientWidth > 699 ? “700px” : “auto” );
/* Set max-width for IE */
}

Advertisements
%d bloggers like this: