-Maximum width/height
IE6 cannot read the max-width and max-height attributes, but ie supports its own JavaScript attribute expression,
For example
Div {width: expression (250 + "PX")} And Div {widt: 250px}
It is consistent in IE's read!
However, If you disable javascript in your browser, your writing will fail.
Therefore, we use another write method to solve the above failure.
* HTML Div # Division {
Width: expression (document. Body. clientwidth> 776? "777px": "Auto");/* sets max-width for IE to set the widest value for IE */
Max-width: 777px;/* This sets the max-width value for all standards-compliant browsers */
}
* HTML Div # Division {
Width: expression (document. Body. clientwidth> (500/12) * parseint (document. Body. currentstyle. fontsize )? "33em": "Auto ");
Max-width: 33em;/* This sets the max-width value for all standards-compliant browsers */
}
The minimum width and height can be achieved in a similar way, as shown below:
* HTML Div # Division {
Width: expression (document. Body. clientwidth <334? "333px": "Auto");/* Set Min-width for IE to set the minimum width for IE */
Min-width: 333px;/* sets Min-width value for all standards-compliant browsers */
}
* HTML Div # Division {
Height: expression (this. scrollheight> 332? "333px": "Auto"); * sets max-height for IE sets the maximum height for IE */
Max-Height: 333px;/* sets max-height value for all standards-compliant browsers */
}
* HTML Div # Division {
Height: expression (this. scrollheight: <334? "333px": "Auto");/* sets Min-height for IE to set the height minimum */
Min-Height: 333px;/* sets Min-height value for all standards-compliant browsers */
}
II. The minimum width/height can be implemented using the above method, but there is a simpler method.
Div # Division {
Min-width: 300px;
Width: Auto! Important;
Width: 300px;
}
Note that the order cannot be changed