Zooming an element and its contents— an alternative to CSS3's zoom property?

Is there a cross-browser method to emulate CSS3′s zoom property? I know how to zoom images and text separately, but cannot seem to keep everything aligned.

One solution might be to read the computed styles of the element and its children, convert all measures to px, multiply them by some factor, and then generate HTML/CSS with these new styles. Another solution might actually make sense. :)

Important: A correct solution assumes nothing about the page it acts on. We don’t know that every element is sized in px, styled by an external stylesheet, or anything else.


2 Solutions

You could try using the Scriptaculous library that provides Effect.Scale functionality.


Turns out that yes, jQuery also has an Effect.scale.

Thanks, Diodeus, for pointing me in the right direction.