max-width in Internet Explorer

Ingenious hackery from Svend Tofte — using Internet Explorer’s proprietry expression() value in CSS to simulate max-width:

Most web-developers know that IE has fallen behind in the race for standards and being able to show the latest and greatest. Many CSS2 properties are unsupported. Some of the more useful ones, are properties such as [max-width](http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-max-width "max-width definition"), [max-height](http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-max-height "max-height definition"), [min-width](http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-min-width "min-width definition") and finally [min-height](http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-min-height "min-height definition"). I will argue, how max-width is a crucial property, when it comes to on line readability, and then I will show you how to make IE emulate the behavior of max-width, and in turn, how to make it emulate many other properties that it’s not directly capable of.

[via Hypothecate]

Comments