SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,301
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    text 'bubble' popup when rollover?

    is there a way to popup a small 'bubble' or 'balloon' of text when a user lets their pointer rest over a particular part of an image? (an image map)

    explorer does this sometime (randomly it seems) when i let my pointer rest of an image that has alt text - it displays the alt text in a speech bubble thing - but only sometimes! so that is no good. also netscape doesn't have this and obviously i want something that'll work in both.

    the reason i want to do this is this - i've got a simplyfied map (a geographical map) as a picture. there's a small piece of info i wish to show for each country, but the map is too small to allow me to put the information directly on the map - so i figured popup bubbles would be a good way.

    anyone know of anyway of doing this? thanks

  2. #2
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some browsers will use the contents of the alt tag, but the correct way of doing it is to use the title attribute.

    This can be added to any element including text links, images and spans.

    <a href="home.html" title="this link takes you home">Home</a>
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  3. #3
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,301
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    great. i'll give that a go now - thanks

  4. #4
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,301
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    yup, that works a treat in explorer but not at all in netscape :/

    any suggestions? it's really got to work in both to be of any use.

  5. #5
    Net Senior Citizen tommatthews's Avatar
    Join Date
    Apr 2001
    Location
    Sydney Australia
    Posts
    869
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could have a look at DynamicDrive for a DHTML solution.


    affordable website design

    :: sydney australia ::

  6. #6
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,301
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    yeah, i found this there> http://www.dynamicdrive.com/dynamicindex5/texttool.htm which is exactly it - works in netscape too thanks tom

  7. #7
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for 5.0 browsers you can just use the title tag:

    <a href="http://www.cnn.com" title="read the news">cnn</a>

    to get NS4 to do it... you have a bit more of a problem...

    dhtml/js soltution for show/hide layers can be found petty easily...

    good luck. jc

  8. #8
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Bill Posters
    Some browsers will use the contents of the alt tag, but the correct way of doing it is to use the title attribute.

    This can be added to any element including text links, images and spans.

    <a href="home.html" title="this link takes you home">Home</a>

    Bill,

    I thought it was the "alt" attribute?

    XHTML Strict 1.0 won't validate without every image having an alt="" tag, even if it's empty. I believe the same goes for HTML 4.01 Strict.

    If I am wrong, please enlighten me about the "title" tag, I have never used it before...


    Thanks

    Chuck
    "Happiness doesn't find you, you find happiness" -- Unknown
    www.chuckknows.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •