CSS sets the minimum height and width of the div, CSS sets the div width
CSS sets the minimum height and width of the div:
The minimum height and width of a div are set to a value. If the actual width or height is smaller than this value, the actual width and height are set to the specified minimum value, the following is a brief introduction to the instance code.
If you use a standard browser, you can use max-height or max-width to achieve this effect. For example:
Max-width: 50px; max-height: 100px;
The above code is no problem in the standard browser, but IE6 does not support it, because there are still a large number of IE6 users, so it must be compatible with IE. The code is modified as follows:
Max-width: 50px; max-height: 100px; width: expression (document. body. clientWidth <50? "50px": "auto"); height: expression (document. body. clientWidth <100? "100px": "auto ");
The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 9656.
For more information, see: http://www.softwhy.com/divcss/