Creating a rollover image
You can insert rollover images in your page. A rollover is an image that, when viewed in a browser, changes when the pointer moves across it.Before you begin, obtain one or more pairs of images for the rollover. You create a rollover with two image files: the primary image (the image displayed when the page first loads) and a secondary image (the image that appears when the pointer moves over the primary image). Both images in a rollover should be the same size; if the images are not the same size, Dreamweaver automatically resizes the second image to match the properties of the first image.
To create a rollover:
-
In the Document window, place the insertion point where you want the rollover to appear.
-
Insert the rollover using one of these methods:
-
Complete the dialog box.
-
In the Image Name text box, type a name for the rollover.
-
In the Original Image text box, click Browse and select the image you want displayed when the page loads, or enter the image file's path in the text box.
-
In the Rollover Image text box, click Browse and select the image you want displayed when the pointer rolls over the original image, or enter the image file's path in the text box.
-
If you want the images preloaded in the browser's cache so no delay occurs when the user rolls the pointer over the image, select the Preload Images option.
-
(Optional) In Alternate Text, enter text to describe the image for viewers using a text-only browser.
-
In the When Clicked Go to URL text box, click Browse and select the file, or type the path to the file that you want to open when a user clicks the rollover image.
NOTE : If you don't set a link for the image, Dreamweaver inserts a null link (#) in the HTML source code to which the rollover behavior is attached. If you remove the null link, the rollover image will no longer work.
-
Click OK to close the Insert Rollover Image dialog box.
-
Click OK.
-
Select File > Preview in Browser or press F12.
You cannot see the effect of a rollover image in Design view.
-
In the browser, move the pointer over the original image.
The display should switch to the rollover image.