CSS Image Maps With Pop-Up Tool Tips

Sponsored Ad

psd 2 xhtml/css advert

Using an unordered list, a couple of images, and a little CSS, we can create an accessible "image map" with pop-up tool tips that provide our readers more information on the links the map contains. There are several techniques out there for doing this, but, unlike some, the one outlined here has the advantage of working in older versions of Internet Explorer.

To begin, we'll need two images, the first one being our image map, and the second one being a 1px by 1px transparent GIF image, which we'll use as a background image for the map's "hot spots" in order to work around a bug in earlier versions of IE.

Here's the image I'll be using for the map itself:

Image M ap

Now we can move on to the HTML. Essentially, what we'll do is create an unordered list of links that each contain a span tag which holds information about the link for our tool tip pop-up. We'll give each link its own class name, so that we can define the area and position for the link's hot spot on the image.

Here's the HTML for my map.

HTML:
  1. <ul id="map">
  2.     <li><a class="bunny" href="#" title="Bunny"><span><b>Bunny Rabbit</b><br>
  3.         Cute and fuzzy, with long ears and a fluffy tail. this cuddly bunny
  4.         makes a great pet.</span></a></li>
  5.  
  6.     <li><a class="parrot" href="#" title="Parrot"><span><b>Parrot</b><br>
  7.         With a lifespan of up to 40 years, these bright, colorful birds
  8.         are wonderful life-long pets. One of only a few birds
  9.         capable of learning to speak, parrots are intelilgent and
  10.         highly social animals.</span></a></li>
  11.        
  12.     <li><a class="snail" href="#" title="Snail"><span><b>Snail</b><br>
  13.         Snails are a wonderful addition to any aquarium-- just make
  14.         sure that its tank-mates aren't going to eat it! Snails say
  15.         "Meow."</span></a></li>
  16.        
  17.     <li><a class="dog" href="#" title="Dog"><span><b>Dog</b><br>
  18.         Man's best friend, a protector and commrade of humans for
  19.         centuries, dogs are faithful, loyal and loving companions.
  20.         </span></a></li>
  21.        
  22.     <li><a class="cat" href="#" title="Cat"><span><b>Cat</b><br>
  23.         Another popular pet, these felines were once viewd as a
  24.         sacred creature amont the ancient Egyptians. Independant,
  25.         sociable, and with a rumbling purr, cats make wonderful
  26.         pets.</span></a></li>
  27. </ul>

Now let's move on to the CSS, starting with the list itself, which we've given the ID of "map." We want to set the margin and padding for our list to zero and then we want to define the size of the list, which should be equal to the size of the image we're using for our map (in this case, 400x200 pixels). Then we'll set that map image as the background. I'm also defining some font styles here, so I don't have to do it later.

CSS:
  1. #map {
  2.     margin:0;
  3.     padding:0;
  4.     width:400px;
  5.     height:200px;
  6.     background:url(map.jpg) top left no-repeat #fff;
  7.     font-family:arial, helvetica, sans-serif;
  8.     font-size:8pt;
  9. }

Then we'll do the list items themselves-- simple stuff, just get rid of the formatting applied by the browser.

CSS:
  1. #map li {
  2.     margin:0;
  3.     padding:0;
  4.     list-style:none;
  5. }

Now we need to apply some styling to the links. Each link will need its own dimensions and positioning (which is why we gave them class names), but they'll also share some common properties, like the fact that they should be absolutely positioned block elements, with the transparent GIF for their background.

CSS:
  1. #map li a {
  2.     position:absolute;
  3.     display:block;
  4.     /*
  5.        Specifying a background image
  6.        (a 1px by 1px transparent gif)
  7.        fixes a bug in older versions of
  8.        IE that causeses the block to not
  9.        render at its full dimensions.
  10.     */
  11.     background:url(blank.gif);
  12. }

Next, we simply need to hide the span inside of our links.

CSS:
  1. #map li a span { display:none; }

After we've done that, we need to define the style, size and position of the tool tip itself. We need to make it visible on mouse over and it should be relatively positioned in relation to the link we're hovering over, with a bit of an offset (20px x 20px in this case). Then we'll make it look pretty, giving it a white background, a border, padding, and lower the opacity slightly, so you can still see what's under the tool tip. We'll set a width of 200px, but we'll let the height be automatically determined by the amount of content in the tool tip. We'll also set the color of the text and get rid of the underline.

CSS:
  1. #map li a:hover span {
  2.     position:relative;
  3.     display:block;
  4.     width:200px;
  5.     left:20px;
  6.     top:20px;
  7.     padding:5px;
  8.     border:1px solid #000;
  9.     background:#fff;
  10.     text-decoration:none;
  11.     color:#000;
  12.     filter:alpha(opacity=80);
  13.     opacity:0.8;
  14. }

Now all that's left is to define our link hot spots and set the size and position of the links, by class name, that correspond with the images. You'll have to do a little bit of measuring here, just as you would with any image map. Just find X, Y coordinates where the top left corner of the hot spot should be, and then determine the height and width from there.

CSS:
  1. #map a.bunny {
  2.     top:20px;
  3.     left:60px;
  4.     width:80px;
  5.     height:90px;
  6. }
  7.        
  8. #map a.parrot {
  9.     top:1px;
  10.     left:275px;
  11.     width:50px;
  12.     height:50px;
  13. }
  14.        
  15. #map a.snail {
  16.     top:135px;
  17.     left:30px;
  18.     width:50px;
  19.     height:50px;
  20. }
  21.        
  22. #map a.dog {
  23.     top:100px;
  24.     left:150px;
  25.     width:115px;
  26.     height:95px;
  27. }
  28.        
  29. #map a.cat {
  30.     top:65px;
  31.     left:315px;
  32.     width:70px;
  33.     height:120px;
  34. }

The final image map can be viewed here.

37 Total TweetBacks: (Tweet this post)
  • : CSS Image Maps With Pop-Up Tool Tips. http://tinyurl.com/6k5gvd 03/05/10 05:19am
  • : Boro striker eager for meeting with former club http://tr.im/DDK7 10/31/09 05:20am
  • es: Nuevo sencillo y nuevo look.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 (via @SuSSIE_4) 10/28/09 07:35pm
  • es: Nuevo sencillo y nuevo look.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 (via @SuSSIE_4) 10/28/09 03:24pm
  • es: Nuevo sencillo y nuevo look.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 10/28/09 02:28pm
  • : http://tr.im/DdK7 10/28/09 08:41am
  • es: RT @SuSSIE_4: Nuevo sencillo.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 10/28/09 06:55am
  • es: esta trankis RT @SuSSIE_4 Nuevo sencillo.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 10/28/09 04:38am
  • es: RT @SuSSIE_4 Nuevo sencillo.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 // RIQUISIMO Track!!!!! 10/28/09 04:24am
  • es: BT @SuSSIE_4 Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/28/09 04:23am
  • es: RT: @SuSSIE_4: Nuevo sencillo.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 - Esta bastante buena =D 10/28/09 04:21am
  • es: RT @SuSSIE_4: Nuevo sencillo.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 <<<---MUY BUENO!!! 10/28/09 04:20am
  • es: RT @SuSSIE_4: Nuevo sencillo.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 <-GENIAL!!! 10/28/09 04:17am
  • es: Nuevo sencillo.... Sund4y:: @Sussie_4 .... http://tr.im/DdK7 10/28/09 04:17am
  • es: RT @SuSSIE_4: Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 <> wow! que beunas imagenes para sus sencillos! 10/28/09 12:59am
  • es: RT @Mopri: Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 // Esta chidito muy bailable como pa bailar antes d meterte a bañar:D 10/27/09 10:08pm
  • es: Wiiii -Sund4y- pásele, escúchela y me cuenta qué le pareció :D http://tr.im/DdK7 10/27/09 09:57pm
  • : Q buena rooooooola 10/27/09 09:36pm
  • es: .. megusto!!! RT-SuSSIE_4 Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 09:06pm
  • es: Me encanta ...RT @minervaoatenea RT @gilo_: RT @SuSSIE_4 Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:54pm
  • es: RT @SuSSIE_4 Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:26pm
  • es: RT @SuSSIE_4 Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 <--- ahuevo!!!! Por fin!!! 10/27/09 08:23pm
  • es: RT @SuSSIE_4 Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:20pm
  • es: RT @SuSSIE_4 Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:12pm
  • es: RT @SuSSIE_4: Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:11pm
  • es: Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:04pm
  • es: Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:04pm
  • es: Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:04pm
  • es: Sund4y:: Nuevo sencillo de @Sussie_4 .... http://tr.im/DdK7 10/27/09 08:04pm
  • en: CSS Image Maps With Pop-Up Tool Tips http://tinyurl.com/6k5gvd from: @Sankesolutions 09/06/09 02:06am
  • en: CSS Image Maps With Pop-Up Tool Tips http://tinyurl.com/6k5gvd from: @Sankesolutions 09/06/09 02:06am
  • en: Well..wasn't that bad! Actually wasn't bad at all.. the main charecter was fucki... Read More: http://is.gd/1wqRv 07/13/09 05:50am
  • es: Notando con asombro que Shay Maria tiene antecedentes chilenos. Creo que me siento orgulloso, maldita sea. http://is.gd/1wqrV 07/13/09 05:41am
  • en: Reading: "Pure Css image map with pop-up information boxes - Quick Guide" (http://tinyurl.com/6k5gvd) 07/12/09 07:19am
  • en: CSS Image Maps With Pop-Up Tool Tips http://tinyurl.com/6k5gvd from: @Sankesolutions 05/21/09 12:23pm
  • en: rt: @swindled CSS Image Maps With Pop-Up Tool Tips http://tinyurl.com/6k5gvd from: @Sankesolutions 05/06/09 02:23am
  • swindled: CSS Image Maps With Pop-Up Tool Tips http://tinyurl.com/6k5gvd from: @Sankesolutions 03/19/09 08:03am

52 Responses to “CSS Image Maps With Pop-Up Tool Tips”

Posted by: mowgli on August 18th, 2007 at 8:14 pm

wow..fantastic....that means no more worries about these things in javascript...thanks a lot...I will apply on my projects...!!!!

Posted by: JM on September 17th, 2007 at 12:02 am

Great work! Thank you for providing this.

I am new to working with css, but I would really like to adapt this for use on a web page layout that is not static. My layout repositions itself whenever the browser window is resized. This is great for my layout remaining in proper perspective, but this throws off the location of all the tool tips. I'm sure the fix for this is probably not extremely difficult, but so far I am at a loss. Ideas?

I notice that the method employed at http://www.frankmanno.com/ideas/css-imagemap/ works well on a layout that is not fixed, but the code looks a little bloated.

Posted by: Scott on September 18th, 2007 at 2:56 pm

Hey, this seems really cool. I am also new to CSS and Dreamweaver, so I'm kind of confused on what to do after I have all of this code? I kind of just put it on the page, and I got this http://www.builtinvacuum.com/cvtv/vids/flashtest1.html I just sort of copied your dimensions and numbers just so I could get an idea of how it worked, but I came up with that.

Could you help me out please?

If so, please E-mail me at scott@builtinvacuum.com

Thanks

Posted by: Teresa on December 10th, 2007 at 2:19 pm

The address above is not yet live...but I need to do an image map with rollovers for neighborhoods that this builder builds in. I LOVE the code you've written here, it's clear and simple and works amazingly well.

However, I have a question I'm hoping you can help me with. We use a proprietary software to build sites so that our clients can easily maintain them. When I put your image and code in...it shows up...but the rollovers are all the way up in the left corner of the screen...rather than being where the image is. The image shows up in the center of the web page...but the only way to get the rollovers to appear is to move the cursor around up in the corner...then they show up. Any suggestion to correct this? I have moved the coordinates for "dog" and it works ok now...just wondered if that's what will need to happen to the rest...coordinates need to be for the page as a whole rather than for the image?

test page: http://www.redsageonline.com/default.aspx?id=562

thanks so much!!!!

Posted by: CSSHowTo.com on December 10th, 2007 at 9:59 pm

In firefox all your rollovers work where they are supposed to, except for the dog!!

Yes the figures have to be adjusted slightly depending on your page and other styles within the page.

Posted by: Rudolf on December 11th, 2007 at 7:02 am

Great work.
Very helpful to avoid javascript.
Thank you.

Posted by: Kelley on December 12th, 2007 at 6:45 pm

Hey, this is excellent!
The only problem I am having is that my list text shows up all the time. When I mouse over the block, it changes form into the pretty little tooltip box, but when I mouseout, it's just this ugly text covering up my image. Any idea why? =/

Posted by: Kelley on December 14th, 2007 at 4:12 pm

I figured out my problem, but I am still having another issue: the same one that Teresa and JM had above. Has anyone found a fix for this?

Posted by: CSSHowTo.com on December 19th, 2007 at 8:11 pm

Do you have a link?

Posted by: Jay on December 26th, 2007 at 11:01 pm

Use this instead to move the image around (Thanks Teresa / Redsage )


#map {
position:relative;
margin:0;
padding:0;
width:400px;
height:250px;
background:url(../images/map.jpg) no-repeat #fff;
font-family:arial, helvetica, sans-serif;
font-size:8pt;
}

Posted by: Stefano on January 4th, 2008 at 7:27 am

Uhm ... using this in Safari 3.04 I get same problems with text tooltips not on the image and so on.
With last CSS code for #map it seems work only if you put list UL inside a DIV with position:relative.

Posted by: web designs on January 23rd, 2008 at 12:42 pm

this is great, i've been looking for an accesble way of using images maps and callouts without using javascript. Well done

Posted by: Devo! on February 15th, 2008 at 10:55 pm

Wow...this is really cool.

I am really impressed about how easy it was to implement this.

and thank you for the relative position patch for the map....

Posted by: CSSHowTo.com on February 16th, 2008 at 11:22 am

Excellent work guys, thanks for the community feedback in helping with the problems, this is what the Web is all about.

Glad you are all finding it helpful.

Posted by: Quentin on April 2nd, 2008 at 4:39 pm

Only two of my five hotspots work! I've checked and re-checked everything but can't figure out where the problem lies. Any help appreciated!

Cheers

Posted by: CSSHowTo.com on April 2nd, 2008 at 10:29 pm

I notice from the CSS file that there are some non standard characters that have gotten into the file, coincidently around all the classes that are not working, things like
Ê Ê Ê Ê

You can see it better here
http://www.quentinjamesdesign.co.uk/strategy/css/screen.css

Delete those characters from the CSS file and you should find it works fine. ;)

regards
Paul

Posted by: Quentin on April 4th, 2008 at 1:42 pm

Wow! Those pesky characters don't appear in BBEdit!

Thanks Paul.

Posted by: KW on April 12th, 2008 at 4:57 am

I seems like a good plan but you didn't tell us where to put these different parts; within whta tags? Do we just pile them upone behind another withing the body tag?

Posted by: mike k on April 21st, 2008 at 11:26 pm

It does seem to have spotty results in IE7, some of my hotspots work while others do not. Worked well in firefox though. I think this can be improved upon in IE7 by setting the display of "li a.span" to block, with an opacity of 0, and giving it a laid out width. This greatly improved the behavior on IE7 for me. More info here: http://www.quirksmode.org/css/opacity.html

Thanks, Mike.

Posted by: Derek on April 23rd, 2008 at 8:48 pm

I can't get this working in IE6 (even the final image map sample).
Has anyone else come across this issue?
Is there a fix?

Posted by: CSSHowTo.com on April 23rd, 2008 at 9:52 pm

Hi Mike,
thanks for posting the fix, although I cannot find any problems with the demo in IE7, if you have a particular link to problematic page, then please post it.

Derek, I don't currently have access to IE6 so cannot retest, originally it all worked fine, but I will get an VNC session set up with a IE6 machine and get back to you hopefully.

Posted by: Derek on April 28th, 2008 at 3:49 pm

Hi, and thanks,
Has anyone had a chance to test/debug this in IE6?

Posted by: CSSHowTo.com on April 28th, 2008 at 9:26 pm

Hi Derek, Please dont post comments twice as it gives me twice as much work to do when approving them. All comments are approved before appearing.

I used IE6 on Win xp with SP2 and the image map worked fine. Could you provide some more information on the URL you are using it on and what systems you are using.

Posted by: Derek on April 29th, 2008 at 5:57 pm

Hi, and apologies for the double post.
I'm using XP IE6.0 SP2....

I'm in a corporate environment, and it appears there's a problem with our machines, not your code.

I just checked out the page on our testing machine and it works great.

I'm so sorry to have wasted your time.

Please keep up the great work.

Posted by: CSSHowTo.com on April 29th, 2008 at 6:54 pm

No Worries, im just glad you got it fixed/sorted!

Posted by: FG on May 2nd, 2008 at 5:32 pm

This code was just what I needed for a tutorial I'm working on, thanks!

The problem that I'm having is that the image I'm using it with is centered and needs to stay that way to be consistent with other pages in the tutorial. When the window is max'd the hotspots are to the left of the images.

Did anyone come up with a resolution for this issue?
I'm having the problem in both IE6 and Firefox.

Posted by: EVS on May 20th, 2008 at 10:22 pm

Great Tutorial! I've been looking for this type of thing.

I am wondering if there is someway to have an additional link within the as I'm using this technique on a property map so that when the user selects a unit, it opens the window with an image, a description and hopefully, a link to a .pdf of a floorplan.

Any advice?

Thanks!

Posted by: stoffel on July 23rd, 2008 at 10:23 am

has anybody experience with poly shapes, instead of rectangles

Posted by: EJB on August 29th, 2008 at 12:05 pm

Hello I have a question: Is it possible to use an image instead of a text tooltip? So when you roll over the spot you can show an image.

thnx

Posted by: Jacob on September 6th, 2008 at 10:25 pm

Link is in name.

I've done this for one hotspot so far and it works fine in Firefox. I tested in IE7 and the hotspot is ten pixels or so lower than where it is supposed to be.
Can someone help me with this?

Posted by: Bronwyn on November 27th, 2008 at 5:08 pm

so i might just be a complete moron, but i cant seem to get the darn text-decoration off my tooltips.

i clearly have text-decoration:none set, and i even changed that around to blink and then back again to test, and it did blink, alright. I just have no idea how to get rid of that darn link underline on my tool tips. i might start crying. eep.

Posted by: Bronwyn on November 27th, 2008 at 5:10 pm

yep. im a moron. i fixed it by poppin' that code into the actual a.cat part. okee. i should seriously go home now.

p.s. great code. clean and easy to manipulate. you surely are very very awesome :)

Posted by: Liz on January 27th, 2009 at 12:40 am

Is there a way to get to put a link in the pop up text?

For example:
Bunny RabbitCute and fuzzy, with long ears and a fluffy tail. this cuddly bunny makes a great pet.mrbunny@bunny.com

I've tried escaping out the quotes:
mrbunny@bunny.com
but I can't get it to work.
thanks

Posted by: Toledoh on February 16th, 2009 at 1:11 am

Hi there.

Instead of a blank.gif, I'm using an icon to display... easy enough.

However, I was hoping to vary the displayed icon... thinking a class in the would work. Can you suggest anything?

ie.

....
...

...

then in the css... something like (????)


#map li a {
position:absolute;
display:block;
background:url(icon.gif);
}

#map current li a {
position:absolute;
display:block;
background:url(current.gif);
}

thanks!

Posted by: Den on February 26th, 2009 at 7:24 am

Hi,

Mostly this is working okay. I have this implemented on 8 links on an image to emulate the tool tips usually done in Javascript.

However, on one of the eight links, I am getting a small thin line at the top and bottom, even though I am using the 1px blank.gif image to compensate.

Anyone else run into this where it works for everything except for one?

Posted by: Larry on March 2nd, 2009 at 8:39 pm

Great technique. Just what I needed for a navigation tool on website redesign.

Posted by: Maryann on April 3rd, 2009 at 8:02 pm

I would also like to know how to add a link within the pop up text! I tried some things, but nothing has worked so far.

Posted by: Z.K. on May 16th, 2009 at 11:37 pm

I was just wondering about this hover code. I am using Visual Studio 2005 as an editor and it puts a red line under the filter and opacity and says that they are not a known CSS property. Any ideas as to why.

#map li a:hover span {
position:relative;
display:block;
width:200px;
left:20px;
top:20px;
padding:5px;
border:1px solid #000;
background:#fff;
text-decoration:none;
color:#000;
filter:alpha(opacity=80);
opacity:0.8;
}

Posted by: Z.K. on May 16th, 2009 at 11:54 pm

Okay, I have it partially working. The tooltips show up okay and I can click the links okay, but for some reason my image does not show up, it is all white. Any ideas how to fix this.

Posted by: ontarget on May 27th, 2009 at 9:26 pm

I would like to know of a fix for ie, some computers' ie works fine but some older ones are "off" a bit.
Thanks

Posted by: sam on May 31st, 2009 at 9:21 am

in my website layout i center the map image to fit into the layout, and it seems to be throwing off the specific placement defined in #map a.example

i had to hunt and peck at ridiculous coordinates to get the links to line up.

has anyone else ran into this problem?

Posted by: blue_8019 on May 31st, 2009 at 3:37 pm

As stoffel commented earlier, does anyone have experience using this with polygon shapes?

I need to implement something just like this (the java I am using puts the links/menus to the left or bottom of the screen) using a territory map of North America. The java version also does not work in Safari.

Any help here would be greatly appreciated. Thanx!

Posted by: Ron on June 15th, 2009 at 1:43 am

Dude, you rock! This is so awesome. I am using it for our office floorplan, with pop-ups for each employee. SOOOO easy!

Posted by: Patti on August 1st, 2009 at 7:04 pm

Thanks for the code. I just have one problem. I trying to insert an image instead of a text pop-up. I get the title and the size of the box by I can't get the image to show up on the roll-over.

Thanks again.

Posted by: Patti on August 2nd, 2009 at 12:43 am

Okay now I have the image, but I have the list order dots

Posted by: Patti on August 2nd, 2009 at 12:48 am

Sorry figured out my mistakes with the dots.

Posted by: Charles on August 26th, 2009 at 5:55 pm

http://scheblerchimney.com/map_test.html

Comes up fine in Safari and Firefox but Not IE 8. Any ideas?

Posted by: Keith on August 28th, 2009 at 8:05 pm

I am using the code and really like it. But it seems I can not get more than 6 links to show up at once. Meaning if I code 10 links only the last 6 will show up linked on the image.
Any ideas?

Posted by: indika on October 20th, 2009 at 11:53 am

can someone please explain why position used "absolute" to "#map li a"

#map li a{
display:block;
position:absolute;
background-image:url(spacer.gif);
text-decoration:none;
color:#000;
}

and later used position "relative" to "#map li a:hover span"

#map li a:hover span{
display:block;
position:relative;
width:200px;
left:20px; top:20px;
padding:5px;
border:2px solid #CCC;
background:#fff;
filter:alpha(opacity=80);
opacity:0.8;
}

Posted by: David Doherty on November 17th, 2009 at 10:12 pm

Great work, but I am having real trouble with this in IE, so I wonder if you could help? I have taken your code and am trying to pop up a menu based on hotspots. All seems to render well in FF but will not work in IE. I would complain about IE but the code does not pass CSS validation, as I am trying to nest UL and LI elements within your original tags (which is wrong, of course).

Is there any chance you cna let me know how this can be done?

For example, my HTML code looks like this:

Wembley

Header
Subtext
Subtext
Subtext

---------------

This renders very badly in IE so any help would be appreciated.

Regards

Posted by: Amy on December 6th, 2009 at 2:14 am

Thank you for this, this is a really great concept. My problem is, I am trying to use it on a dynamic (asp) page, and the image displays differently in IE than in Firefox once the server builds the page. If I code the links based on their placement in FF, they show up in the wrong place in IE, and vice versa. I've tried changing the positioning between relative/absolute and various other fixes, and I can't figure out how to make the links relative to the map UL OR the [a] anchor such that the coords stay the same regardless of whether IE adds more padding to the header-sidebar etc. The URL of my test page is above on my name (so far only "Albuquerque" "Alamogordo" and "Ruidoso" are actually coded).

Plus I don't really understand why the text is displaying in different places when I am trying to get it to line up in one place along the right side of the map, but I can live with that if I could just get it to work across browsers.

Thanks to anyone for any suggestions.

Posted by: Steve on December 28th, 2009 at 7:54 pm

Very cool code. I have one small problem - the tool tips show up upon hovering but there is a white box for all hotspots. Any idea on how to eliminate those?

Thanks,

Steve



Make Your Mark

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting