11.12.2012 Views

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Under browsers like Internet Explorer that support expressions within CSS rules, we might use<br />

something cleaner like this:<br />

<br />

Internet Explorer Font Sizing!<br />

Note It might be even better to avoid using <strong>JavaScript</strong> to size objects in CSS and instead rely<br />

on relative sizing measurements, like percentage or em values.<br />

Besides sizing, we might also dynamically address color issues on the Web using <strong>JavaScript</strong>.<br />

For example, many designers still use reduced color images that stick to a limited 216-color<br />

palette, called the ―browser-safe‖ palette, when they might be able to use richer images in many<br />

situations. <strong>The</strong> following code could be used to insert different types of images conditionally:<br />

<br />

><br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!