Creating a rollover image

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.

Rollover images are automatically set to respond to the onMouseOver event. For information about setting an image to respond to a different event (for example, a mouse click) or about editing a rollover to display a different image, see Swap Image.

To create a rollover:

  1. In the Document window, place the insertion point where you want the rollover to appear.
  2. Insert the rollover using one of these methods:
    • In the Insert bar, select Common, then click the Rollover Image icon.
    • In the Insert bar, select Common, then drag the Rollover Image icon to the desired location in the Document window.
    • Select Insert > Interactive Images > Rollover Image.

      The Insert Rollover Image dialog box appears.

  3. Complete the dialog box.

    For more information, see Setting the Image Rollover dialog box options.

  4. Click OK.
  5. Select File > Preview in Browser or press F12.

    You cannot see the effect of a rollover image in Design view.

  6. In the browser, move the pointer over the original image.

    The display should switch to the rollover image.

Related topics

  • Inserting a navigation bar


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Inserting and Formatting Text
Adding Audio, Video, and Interactive Elements
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly