Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    22
    Thanks
    6
    Thanked 0 Times in 0 Posts

    How to Do a Text Rollover Callout with HTML

    Hello,

    On a web page, I want to simulate the "Comment" feature in MS Word, where the text has a yellow background, and when the mouse is moved over the text, the comment pops up in a box.

    The closest I've been able to come is the following:


    <A HREF="" TITLE="Technically, a comma
    belongs here, but because
    the second clause is short,
    the comma isn't necessary
    and disturbs the flow."><span style="background-color: yellow">a woman and</span></A>


    But there are two problems: The target ("a woman and") is underlined, and if the target is clicked on, the user is sent somewhere else.

    Any suggestions on how to get the effect I want without the underlining and without it being a link to somewhere else?

    I'd like to keep it simple if possible, using HTML alone.

    Thanks!
    Bill

  • #2
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,960
    Thanks
    120
    Thanked 76 Times in 76 Posts
    It si underlined & links you omewhere coz that is default for <a> tag. Pick any other tag instead.
    That is you could erase everything regarding A and move title into span.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #3
    New Coder
    Join Date
    May 2007
    Posts
    22
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Hi,

    I tried playing around in your suggestion but don't get it.

    Could you please show what the code would look like?

    Thanks,
    Bill

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    You could just add a style rule to remove the underline...


    text-decoration: none;
    Teed

  • #5
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,960
    Thanks
    120
    Thanked 76 Times in 76 Posts
    Code:
    <span style="background-color: yellow" TITLE="Technically, a comma
    belongs here, but because
    the second clause is short,
    the comma isn't necessary
    and disturbs the flow.">a woman and</span>
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • Users who have thanked BubikolRamios for this post:

    BSquared18 (11-11-2011)

  • #6
    New Coder
    Join Date
    May 2007
    Posts
    22
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Thanks, BubikolRamios.

    That did the trick!

    Bill


  •  

    Tags for this Thread

    Posting Permissions

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