Alex Meub

Fun with IE7 and the Zoom Property

This bug threw me for a loop. A CSS optimizer thought it was doing me a favor by “fixing” any invalid numbers.

Zoom Fix

It replaces .my_class{ zoom:1; } with .my_class{ zoom:1px; }

Those two characters (“px”) on the zoom property will blow up IE7 as it tries to zoom to a value in pixels. It will zoom your whole app way out so the text looks microscopic. It will also probably crash the browser. I spent hours pouring over my scripts only to eventually realize that the error was coming from those two characters in a single line of CSS that the optimizer put in there.

Don’t use third party tools unless you 100% trust them.

I’d recommend using procssor instead.