1. About.com
  2. Computing & Technology
  3. Web Design / HTML

Discuss in my forum

How to Create a Rollover Image in Dreamweaver

By , About.com Guide

Dreamweaver Adds the HTML for the Rollover
The HTML

The HTML

Screen shot by J Kyrnin

If you chose to have Dreamweaver preload the rollover images, then you will see the HTML code in the body of your document (indicated in yellow) to call the preload script so that your images load more quickly.

onload="MM_preloadImages('shasta2.jpg')"

Dreamweaver also adds all the code for your image and links it (if you included a URL). The rollover portion is added to the anchor tag as onmouseover and onmouseout attributes (in green).

onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','shasta1.jpg',1)"

©2012 About.com. All rights reserved. 

A part of The New York Times Company.