Tutorials2u.com

Tutorials on various topics

Creating a Layer

Creating a Layer
 
Murray Johnson

Ever been low on real-estate on your Web page and had to make the images a little smaller than you wanted so they’d fit? Well this script will help you out. It allows you to zoom in on a thumbnail sized picture without changing pages but with a simple mouse over.

First of all, to combat the differences in Netscape and Internet Explorer you need a script that will determine which one the client is using. Cut and paste this code into the HEAD of your page:

Next we write the JavaScript function to create the layer based on the client’s browser:

Next we write the JavaScript to show and hide the layer based on the client’s browser:

Finally, cut and paste this code in your page where you want it:

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Last Entries

Archives


Links