The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> HTML Image Map Hover Function
bnew10
post Jan 25 2012, 04:46 PM
Post #1


Newbie
*

Group: Members
Posts: 18
Joined: 25-January 12
Member No.: 16,329



Hello, let me preface my post by stating that I am a beginner when it comes to HTML code. I apologize ahead for my ignorance...

Now my questions, I am in the process of creating an image for the company I work for. Basically, I used Illustrator and have created an image with the goal of "mapping" particular areas of this image to create a "hover" effect. I am not sure if these are the correct terms to describe my goal. None the less, I have about 9 separate areas of this image that I would like a small text box to appear when someone rolls their mouse over each area. The text that appears on the rollover would be short and not too lengthy.

I have read a little into the process of "image mapping", but I do not need the mapped area to send someone to a different URL. I just want some simple text to appear to describe/explain the area of the image that folks are hovering above with their mouse. I am not sure if image mapping is still the process I need to pursue, or if there is a whole different process I need to use to achieve this goal?

Keep in mind I am unfamiliar with HTML terms and process (I went to school in a completely unrelated field) but I have enjoyed doing some very basic editing online. Typically, I have used a composer application to assist me with the technical process of HTML editing. Obviously, my goal would be to add this image to several different areas of our website, and allow this image to function as stated above. It appears that this is possible to do, and I have my image done and ready to edit to reflect the desired function.

If this helps, the image is that of a baseball diamond. The goal is when a customer hovers over a specific position on the field the text box would appear explaining the position further, then vanish when they moved their mouse away from that specific area.

Any help or links that might be helpful will be much appreciated. Thank you all...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
pandy
post Jan 25 2012, 05:22 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



How simple is OK? The most basic approach is to use the title attribute with the AREA tags of your image map.
http://htmlhelp.com/reference/html40/attrs.html#title
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
bnew10
post Jan 25 2012, 05:47 PM
Post #3


Newbie
*

Group: Members
Posts: 18
Joined: 25-January 12
Member No.: 16,329



QUOTE(pandy @ Jan 25 2012, 05:22 PM) *

How simple is OK? The most basic approach is to use the title attribute with the AREA tags of your image map.
http://htmlhelp.com/reference/html40/attrs.html#title



@Pandy,

Thank you for the reply. Do you have a link you could provide that shows an image using this type of effect? I am curious at to what the text would look like when hovering the mouse above the specific area. Also, using this process does it allow defining a particular area of my image and allow for different text to appear when hovering over each specific area? I could not locate any coordinates in the HTML on the link you provided that implied you could mark certain areas for this hover option...

thanks again.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 25 2012, 06:20 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



'title' can be used with almost any element. There is no special procedure for each one. It's just an attribute. It produces the typical pale yellow tooltip box.

Let's see if I got the coordinates right here now...

CODE

<img src="http://htmlhelp.com/icon/wdglogo.gif" width="250" height="74" usemap="#map" alt="Webdesign Group">

<map name="map">
   <area coords="0,0,125,75" title="This is the left side">
   <area coords="125,0,250,75" title="This is the right side">
</map>


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
bnew10
post Jan 25 2012, 07:00 PM
Post #5


Newbie
*

Group: Members
Posts: 18
Joined: 25-January 12
Member No.: 16,329



QUOTE(pandy @ Jan 25 2012, 06:20 PM) *

'title' can be used with almost any element. There is no special procedure for each one. It's just an attribute. It produces the typical pale yellow tooltip box.

Let's see if I got the coordinates right here now...

CODE

<img src="http://htmlhelp.com/icon/wdglogo.gif" width="250" height="74" usemap="#map" alt="Webdesign Group">

<map name="map">
   <area coords="0,0,125,75" title="This is the left side">
   <area coords="125,0,250,75" title="This is the right side">
</map>





Ok, so whatever the "title" is equal to will be what the text field will show when hovering over the "area coords"?

Also, I do not have to determine my locations before uploading the image to our server, correct? My HTML text will determine the properties of that image, as far as where on the image the hovering will activate the pop-up text? Basically, I upload my image to our browser, provide that image source, and then have my HTML text detail how that image will interact online?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 25 2012, 07:37 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



QUOTE
Ok, so whatever the "title" is equal to will be what the text field will show when hovering over the "area coords"?


Yup. You've seen it before. Every time you've seen those yellow boxes it has been title in action.

QUOTE
Also, I do not have to determine my locations before uploading the image to our server, correct? My HTML text will determine the properties of that image, as far as where on the image the hovering will activate the pop-up text? Basically, I upload my image to our browser, provide that image source, and then have my HTML text detail how that image will interact online?


Not sure I follow how you mean. It will work online and locally. The coordinates are relative the image dimensions.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
bnew10
post Jan 25 2012, 07:44 PM
Post #7


Newbie
*

Group: Members
Posts: 18
Joined: 25-January 12
Member No.: 16,329



QUOTE(pandy @ Jan 25 2012, 07:37 PM) *

QUOTE
Ok, so whatever the "title" is equal to will be what the text field will show when hovering over the "area coords"?


Yup. You've seen it before. Every time you've seen those yellow boxes it has been title in action.

QUOTE
Also, I do not have to determine my locations before uploading the image to our server, correct? My HTML text will determine the properties of that image, as far as where on the image the hovering will activate the pop-up text? Basically, I upload my image to our browser, provide that image source, and then have my HTML text detail how that image will interact online?


Not sure I follow how you mean. It will work online and locally. The coordinates are relative the image dimensions.


Sorry, I will attempt to explain better. I just wanted to confirm that there is nothing I need to do to an image other than upload it to our server, if I want to map out different areas of that image. Basically, I can add coordinates to create the hovering title box to any image online as long as I know the URL of the image and the coordinates I need to map out on the image itself, correct? The image itself does not require any editing to allow this hovering function?

Thanks again!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 25 2012, 07:52 PM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



Now I'm with you. Yes, that is correct. You don't need to do anything to the image itself.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
bnew10   HTML Image Map Hover Function   Jan 25 2012, 04:46 PM
pandy   How simple is OK? The most basic approach is to us...   Jan 25 2012, 05:22 PM
bnew10   How simple is OK? The most basic approach is to u...   Jan 25 2012, 05:47 PM
pandy   'title' can be used with almost any elemen...   Jan 25 2012, 06:20 PM
bnew10   'title' can be used with almost any eleme...   Jan 25 2012, 07:00 PM
pandy   Yup. You've seen it before. Every time you...   Jan 25 2012, 07:37 PM
bnew10   Yup. You've seen it before. Every time you...   Jan 25 2012, 07:44 PM
pandy   Now I'm with you. Yes, that is correct. You do...   Jan 25 2012, 07:52 PM
bnew10   Now I'm with you. Yes, that is correct. You d...   Jan 25 2012, 07:58 PM
pandy   It requires some CSS and/or JavaScript knowledge. ...   Jan 25 2012, 08:48 PM
pandy   Forgot to say that this doesn't work in IE ver...   Jan 25 2012, 08:52 PM
bnew10   Forgot to say that this doesn't work in IE ve...   Jan 26 2012, 04:03 PM
bnew10   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTM...   Jan 27 2012, 06:00 PM
Frederiek   Have a look at this CSS exemple from Stu Nicholls ...   Jan 26 2012, 04:15 AM
bnew10   Have a look at this CSS exemple from Stu Nicholls...   Jan 26 2012, 04:05 PM
bnew10   Have a look at this CSS exemple from Stu Nicholls...   Jan 26 2012, 04:07 PM
pandy   I haven't looked, but it's probably basica...   Jan 26 2012, 04:49 PM
bnew10   I haven't looked, but it's probably basic...   Jan 26 2012, 05:19 PM
pandy   Nope. You can't change a thing about how the t...   Jan 26 2012, 06:11 PM
bnew10   Nope. You can't change a thing about how the ...   Jan 27 2012, 05:35 PM
pandy   If the user has turned it off (not likely), uses a...   Jan 27 2012, 05:42 PM
bnew10   If the user has turned it off (not likely), uses ...   Jan 27 2012, 06:01 PM
pandy   Just play around with it. It's often easier if...   Jan 27 2012, 07:08 PM
bnew10   Just play around with it. It's often easier i...   Jan 27 2012, 07:38 PM
pandy   There you go! You picked that up quickly! ...   Jan 27 2012, 07:54 PM
bnew10   There you go! You picked that up quickly...   Jan 27 2012, 08:09 PM
bnew10   There you go! You picked that up quickly...   Jan 27 2012, 08:18 PM
pandy   Exactly. Units are basically always required in ...   Jan 27 2012, 09:15 PM
bnew10   Excellent information... Ah, makes perfect sens...   Feb 1 2012, 04:09 PM
pandy   It works? Great! :)   Feb 5 2012, 09:05 PM
bnew10   It works? Great! :) Thanks for your help, ...   Feb 8 2012, 04:04 PM
Darin McGrew   There are also browser settings, browser plugins, ...   Jan 27 2012, 07:52 PM
bnew10   Is this correct? Or at least more so? <!D...   Jan 27 2012, 09:11 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 05:30 AM