views:

607

answers:

2

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.

Thanks!

+2  A: 

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

Diodeus
Didn't check Scriptaculous. Nice. I wonder if there's a jquery equivalent?
nilihm
A: 

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

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

nilihm