spacer
Yehuda Shiran June 2, 2000
The zoom Property
Tips: May 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Internet Explorer 5.5 and up allows you to enlarge or shrink an object in your page by the zoom property. You just need to set the property as follows:

object.style.zoom = magnification;

where magnification can be one of the following:

normalDefault. Normal size. No zoom in or zoom out.
scaleFloating point number that specifies the factor to apply. 1.0 is normal.
percentageFloating point number followed by a percent sign. 100% is normal.

You can apply this property to any object. For example, we made the paragraph you are reading now larger by a factor of 1.27. You need to identifiy the paragraph by an ID attribute, and then assign its zoom property in a JavaScript script. The paragraph looks like this:

<P ID="demo">You can apply...like this:</P>

and the JavaScript script looks like this:

<SCRIPT LANGUAGE="JavaScript">
<!--

demo.style.zoom = "127%";

// -->
</SCRIPT>


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint