Spartanicus said:
I received an email follow up to this message from Steve (he's at work
sans newsgroup access) in which he pointed out a mistake in the above
example. I had copy/pasted the code from Mark's message straight into
the code without checking.
I should have known better than to trust Mark ;-)
;-)
The mistake has been rectified (the point stands).
The point being?
Yes, your example shows different behaviour in IE and more compliant
browsers. But is your example a realistic demonstration of a situation
where min-width would be applied?
It shows that Mark's code is a basis for a min-width substitute but
that it (a) needs further styles and (b) may not be useful in all
cases where min-width is desired.
The OP didn't specify his exact situation so we don't know whether
Mark's code can be used as the basis for a working substitute.
Personally, I find min-width (and max-height) much less useful than
max-width (and min-height).
Add a float: left to the styles in your demo and any browsers that
uses CSS 2.1 float model will display floated boxes that are (a) no
smaller than 20em wide, (b) otherwise as small as possible. Though the
necessity of specifying something like white-space: nowrap; for IE
limits the applications. Only browsers that are limited to the CSS 2
float model (in real world terms that just Mac IE) will behave
differently.
If there was an easy and universal IE substitute for min-width then we
wouldn't be having this discussion. ;-)
Steve