Reputation: 61
I am using object.style.zoom
for making zoom inside the div tag, it is working in IE. I need it for Firefox. Please guide me. Can I get any replacement for style.zoom
.
Upvotes: 2
Views: 12385
Reputation: 11
document.getElementById("myMainBody").style.transform = "scale(0.8)";
document.getElementById("myMainBody").style.transformOrigin = "0 0";
Given script shows unwanted "OPTIONS" panel in Firefox/Chrome browser
The above script brings unwanted "OPTIONS" panel in Firefox/Chrome browser. I tested with Chrome too, this appears at chrome too (But we have an alternate in chrome, ie. style.zoom). Is there any way we can get rid of this OPTIONS panel in Firefox, which is shown when we use the above script?
Upvotes: 1
Reputation: 228182
zoom
is not implemented in Firefox.
The "replacement" is transform
from CSS3: https://developer.mozilla.org/En/transform
A JavaScript example for Firefox:
document.getElementById('x').style.MozTransform = "scale(2)";
document.getElementById('x').style.MozTransformOrigin = "0 0";
It's worth pointing out that CSS3 transforms are supported in all modern browsers. You should only be using zoom
as a fallback for IE8 and lower.
Upvotes: 7