New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Image maps

From: Dreamweaver CS3 Essential Training

Video: Image maps

In this last movie of this chapter, I'd like to take a look at one more type of linking called "image maps". I'm going to go ahead, and close this document that we were working on in the previous movie, and in my Files panel, we're going to open up a file called "locations.html". And this is just a page that will direct people to the different teacloud stores located all over the country; so easy to set them up when you have a fake company. But what we have here is an image of the United States, and you can see it's divided into pacific, northern, eastern, and, southern areas. Now, this is one image. You can see there's a box around this entire image.

Image maps

In this last movie of this chapter, I'd like to take a look at one more type of linking called "image maps". I'm going to go ahead, and close this document that we were working on in the previous movie, and in my Files panel, we're going to open up a file called "locations.html". And this is just a page that will direct people to the different teacloud stores located all over the country; so easy to set them up when you have a fake company. But what we have here is an image of the United States, and you can see it's divided into pacific, northern, eastern, and, southern areas. Now, this is one image. You can see there's a box around this entire image.

If I wanted to create a link to my stores, I can only have one link when I have the entire image selected like this. Notice down here with this image selected, I have one Link field just like when I had these Menu buttons selected up here; I have one link field to set links for those Menu buttons. But there may be times when you want different areas of the image to link to different parts of your web page. In order to do so, you need to create an image map, in which you actually map out regions on the image to provide links to other web pages, whether they happen to be on your site, or otherwise. Notice with this image selected, we have this Map area down here in our Properties Inspector.

If you don't see that area make sure that your Properties Inspector is not collapsed like this. Make sure you have the full Properties Inspector available, but you should see this Map area down here. And the Map area basically involves these four tools that you see here. We've got our Pointer Tool, which is selected by default. A Rectangular Hotspot Tool, a Circular Hotspot Tool, they call it the Oval, but you can only draw circles with it, and a Polygon Hotspot Tool for drawing irregular shapes. And basically you use these tools to draw the areas on your page that you want to turn into Hotspots on your image map.

Now, for something as irregular as the United States is shaped, I'll most likely want to stick to the Polygon Tool. Maybe I could get away with the Rectangular Tool up here for the northern stores so, if select the Rectangular Tool, and I'm just going to put my curser right here at the border, drag up, and we'll just take it to right there. We'll leave out that little piece of Michigan for now, and there is my Map. Notice this message that I'm getting that says "Please describe the image map in the 'alt' field on the Properties Inspector". This description is going to help visually impaired people who use tools that use the web. Basically people with vision disabilities, who might have audible readers, or screen reading software to read their images, they won't be able to use your image map unless you provide this alternate text for accessibilities reasons. So, you can see, with my image map drawn, I have a Hotspot Properties Inspector now, and right down here I'm just going to type in "northern stores" as my alternate text, that way there'll be a description of what this box is.

Notice that we have a link area that automatically has a "#" in there. Right now it's just a placeholder. What you need to do here is actually just link to the web page that you want to link to. So, If I in fact had a page listing all the stores in the Northern United States, I could link to that page, just by browsing for it, or pointing to the file, or just typing it in. I don't have any of those pages created right now, but just for this example we'll just imagine the page is called "northernstores.html", and that's it. That's my hotspot link. If I save this page, and check this out in the browser. Here's my page. Notice that as I roll over the image, I don't see a pointer finger until I roll over that area where my image map exists.

There's my link area, and if you look down here at the Status bar, you can see that it's linking to northernstores.html. Of course, that page doesn't exist so, it's going to tell me it can't find it, but you got the idea. I've now drawn a hotspot on this image, and that's the only part of this image that's currently active as a link. Back in {italic}Dreamweaver,{plain} if I go look at the code, you can see the code that it actually had to write for this. It writes coordinates, as you can see right here describing that area. The shape is a rectangle, those are the coordinates, and there's the link. Now, the rest of these areas I probably cannot get away with using the rectangle with. So, instead I'm going to come down here, select the entire image first, come down, we're going to get the Polygon Hotspot Tool. The Polygon Hotspot Tool allows you to draw irregular shapes, and the way that it works is you basically click your points around the area that you want to turn into a hotspot.

Let's just stay we start right down here, and I'm going to click once. It's going to give me a message again. I'm just going to say OK, and dismiss it, and then we'll just come in here, and notice that it's drawing lines. When I click my third point, {italic}Dreamweaver{plain} tries to close off the shape. I'm going to ignore that, and just keep clicking around the pacific store area here. It's best to try to use as few points as possible, meaning there'll be less code written. You don't have to be exactly precise along the entire edge of the United States here. And let's see, that's probably good. Now, obviously you don't want to overlap other hotspots or else you'll have some kind of weird conflict going on with the same area linking to two different spots.

So, avoid overlapping your hotspots. It looks like I didn't quite line that up the way I wanted. So, what I can do is select my Arrow Tool now, and now I can click on a point and I can edit that point and change it so, let's make sure that lines up a little bit better to the northern stores area. Maybe like that, just drag that up a little bit more, and maybe we'll just drag that so the actual bowl is included there. And there's my irregular Polygon Hotspot shape. We want to make sure that we add some alternate text.

And we'll add our non-existent link. Of course, I can always create these pages later, and my links will already be created. So, there it is, and I can now work on my next hotspot. Now one thing to be careful about when working with the Polygon Tool, because you're working with an irregular shape, {italic}Dreamweaver{plain} has no idea when you're done drawing that shape. So, if I come in here, and select the Polygon Tool again, with the pacific stores shape still selected, if I start clicking it's going to assume that I want to continue working on that shape. Let me undo that. So, what you need to do is after you draw your shape, if it still has these dots around it, these handles around it, {italic}Dreamweaver{plain} assumes that you still want to work with that particular hotspot even if you're done with it. So what you want to do after you're done is make sure you select the Arrow Tool, click somewhere off of that shape to deselect it, then select your Polygon Tool again, and then you can start drawing a new shape, and we'll just come in here, and ignore that, and we'll come in here, and continue clicking around to draw our next shape. And again just try to use as few points as possible, and just get the general shape of the hotspot you're trying to draw. Just like that, and we'll call this one southern states.

Add our link, and to draw the last one, again we want to select the Arrow Tool, click off to deselect that shape, select my Polygon Tool again, and now we can come in here, and draw the next shape, and there we go.

We'll call this one "eastern stores", and we'll add our link, and there it is. So, now I have my four Hotspot areas. Now, I guess I called that one "southernstates" by accident. Let's change that back to "stores". The thing about the Polygon Tool is that it's a lot more complicated to write in code.

You see, compared to the rectangle, which had four coordinates up here, this Polygon has a lot more coordinates. So, just be glad that {italic}Dreamweaver{plain} does all this for you, and you don't have to map this out by hand like we used to have to do when created image maps. So, now if I Preview this in my browser, if you watch the Status bar down here at the bottom as I roll over these different areas, you can see that even though I have one image, I've created four different Hotspots that link to four separate pages in my website. So, that's creating an image map. Now, incidentally if you don't want to see that message that appears every time you try and draw a hotspot, if you get the idea and just think you'll remember that you have to put in some alternate text, what you can do-- Let me undo that spot I just put down.

Go to {italic}Dreamweaver{plain} Preferences, and under the Accessibility category you can uncheck Images from the Show attributes when inserting, click on OK, and now when I draw a hotspot I don't get that warning, and I can just draw my hotspot under interrupted. I'll just delete that. Just be aware that when you turn that off you will no longer see the dialog box when you drag in images as well, so remember that alternate text is important but if you don't want to see that reminder every time, you know how to turn that off now. So, that's how we create image maps in {italic}Dreamweaver.{plain}

Show transcript

This video is part of

Image for Dreamweaver CS3 Essential Training
Dreamweaver CS3 Essential Training

129 video lessons · 86864 viewers

Garrick Chow

Expand all | Collapse all
  1. 1m 12s
    1. Welcome
      1m 12s
  2. 21m 0s
    1. HTML vs. XHTML
      3m 4s
    2. What is CSS?
      3m 48s
    3. What is XML?
      2m 11s
    4. What is DHTML?
      1m 9s
    5. What is JavaScript?
      1m 23s
    6. File naming conventions
      3m 22s
    7. What is an index page?
      6m 3s
  3. 46m 18s
    1. Setting up your workspace
      2m 39s
    2. The Welcome screen
      4m 11s
    3. Windows and Mac differences
      3m 18s
    4. The Insert bar
      4m 38s
    5. The Property Inspector
      1m 50s
    6. The Document toolbar
      6m 6s
    7. The Document window
      9m 11s
    8. Panels and panel groups
      6m 58s
    9. Saving workspace layouts
      2m 22s
    10. Defining a default browser
      5m 5s
  4. 24m 59s
    1. Defining a site
      9m 5s
    2. File and folder management
      3m 11s
    3. Understanding path structure
      3m 17s
    4. Adding content to a site
      6m 6s
    5. Creating a site map
      3m 20s
  5. 38m 39s
    1. Creating a new blank site
      6m 0s
    2. Creating and saving a new document
      7m 54s
    3. About DOCTYPE
      3m 59s
    4. Inserting images
      9m 26s
    5. Inserting text
      3m 35s
    6. Aligning text and images
      4m 9s
    7. Inserting meta tags
      3m 36s
  6. 45m 58s
    1. Link basics
      6m 4s
    2. Linking with Point to File
      5m 18s
    3. External links
      4m 15s
    4. Creating email links
      5m 49s
    5. Named anchors
      7m 37s
    6. Linking to a file
      7m 35s
    7. Image maps
      9m 20s
  7. 1h 8m
    1. About CSS
      4m 52s
    2. Anatomy of a style sheet
      4m 10s
    3. CSS and page properties
      10m 11s
    4. Moving an internal style sheet to an external style sheet
      6m 46s
    5. The CSS Styles panel
      3m 48s
    6. CSS selectors
      2m 37s
    7. Type selectors
      12m 13s
    8. ID selectors
      10m 21s
    9. Class selectors
      5m 42s
    10. Creating rollovers with pseudo-class selectors
      7m 22s
  8. 42m 54s
    1. CSS vs. the Font tag
      2m 42s
    2. Formatting text with the Property Inspector
      8m 41s
    3. What measurement should I use?
      3m 15s
    4. Managing white space with margins, padding, and line height
      8m 34s
    5. Using font lists
      5m 45s
    6. Aligning text
      2m 47s
    7. Creating lists
      5m 8s
    8. Creating Flash text
      6m 2s
  9. 43m 19s
    1. About tables
      1m 28s
    2. Tables in Code view
      2m 36s
    3. Creating and adding content to tables
      7m 40s
    4. Changing table borders with XHTML
      5m 46s
    5. Coloring tables with XHTML and CSS
      6m 41s
    6. Aligning table content
      6m 39s
    7. Sorting tables
      3m 6s
    8. Setting table widths
      4m 48s
    9. Creating rounded-corner tables
      4m 35s
  10. 28m 22s
    1. Dreamweaver's layout tools
      3m 8s
    2. Tracing images
      4m 58s
    3. Adding AP div tags
      7m 29s
    4. Working with Layout Tables
      6m 55s
    5. Adjusting table widths and nesting tables
      5m 52s
  11. 16m 19s
    1. What is a device?
      3m 14s
    2. Attaching a printer-friendly style sheet
      3m 5s
    3. Styling for print
      7m 41s
    4. Adobe Device Central
      2m 19s
  12. 29m 54s
    1. Rollover rules
      3m 31s
    2. Creating simple rollovers
      5m 36s
    3. Creating disjointed rollovers
      7m 12s
    4. Creating navigation bars with multiple states
      9m 21s
    5. Creating Flash buttons
      4m 14s
  13. 26m 32s
    1. Viewing the code
      6m 9s
    2. Editing in Code view
      3m 0s
    3. The Code toolbar
      5m 11s
    4. Working with Code Collapse
      4m 27s
    5. The Quick Tag Editor
      2m 20s
    6. Working with snippets
      5m 25s
  14. 32m 45s
    1. About forms
      3m 23s
    2. Adding text fields
      9m 52s
    3. Adding checkboxes and radio buttons
      5m 37s
    4. Adding lists and menus
      6m 5s
    5. Submitting form results
      3m 23s
    6. Styling form elements with CSS
      4m 25s
  15. 23m 17s
    1. Opening a new browser window
      9m 38s
    2. Creating a popup message
      2m 50s
    3. Validating text fields
      2m 42s
    4. Getting more behaviors
      7m 2s
    5. Removing extensions
      1m 5s
  16. 14m 58s
    1. External image editor preferences
      3m 18s
    2. Built-in image editing tools
      3m 11s
    3. Roundtrip editing from Dreamweaver to Fireworks or Photoshop
      4m 39s
    4. Copying and pasting
      3m 50s
  17. 34m 16s
    1. Templates in action
      5m 12s
    2. Creating a new template
      6m 36s
    3. Applying templates
      3m 36s
    4. Modifying a template
      1m 40s
    5. Adding repeating regions
      3m 28s
    6. Working with repeating regions
      3m 13s
    7. Adding optional regions
      3m 34s
    8. Creating a library item
      3m 48s
    9. Modifying a library item
      3m 9s
  18. 13m 2s
    1. Using the History panel
      4m 24s
    2. Saving History steps as commands
      3m 25s
    3. Using Find and Replace
      5m 13s
  19. 14m 44s
    1. W3C accessibility guidelines
      4m 6s
    2. Accessibility preferences
      1m 29s
    3. Inserting accessible images
      3m 2s
    4. Inserting accessible tables
      2m 53s
    5. Inserting accessible form objects
      3m 14s
  20. 26m 17s
    1. About media objects
      2m 6s
    2. Linking to audio and video files
      5m 56s
    3. Embedding audio and video files
      7m 7s
    4. Setting parameters
      4m 27s
    5. Inserting Flash content
      2m 37s
    6. Inserting Flash video
      4m 4s
  21. 28m 47s
    1. Getting site reports
      3m 35s
    2. Checking links sitewide
      3m 30s
    3. Signing up with Tripod
      6m 36s
    4. Entering remote info
      4m 13s
    5. Publishing your site
      5m 41s
    6. Updating and publishing pages
      5m 12s
  22. 44s
    1. Goodbye

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes changes my life forever. @JosefShutter
@lynda is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?


Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.