|
Answer» Title is wrong , correct one should be : Do you use MIN/MAX-WIDTH and MIN/MAX-HEIGHT ??
I am building a liquid layout with percentage and wonder if I have to use MIN/MAX-WIDTH and MIN/MAX-HEIGHT , knowing that IE 6 and earlier versions do not support it. Do you use them ? Is there any rule available to avoid the bug ? Nightmare area of browser incompatibility. There are LOTS of hacks out there DESIGNED to get around this PROBLEM. For example:
http://perishablepress.com/press/2008/05/19/css-hackz-series-minimum-width-maximum-width-for-internet-explorer-6/ http://www.cssplay.co.uk/boxes/minwidth.html
I'm sure you can find more...Yes I still use those. You can avoid the bug by ADDING an empty(but with an ) div with a fixed size(e.g. 150px) to the container which has a min width/height and set the container to 100%. The container will be 100% or 150px(which ever is larger). For the maximum width/height there will PROBABLY be a similar solution but I never use max, I use just fixed sizes for that. I use min-height all the time, still.
to make it work in IE 6/7/8, and Firefox (and all other recent browsers), use this:
min-height: 150px; height: auto !important; height: 150px;
It simply WORKS. Perfectly.
As for max-height or min/max width..... why bother? There are ways to make min-width with percentages but are you really that concerned?[link Removed]
|