...

View Full Version : How to Do a Text Rollover Callout with HTML



BSquared18
11-11-2011, 03:30 PM
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

BubikolRamios
11-11-2011, 03:47 PM
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.

BSquared18
11-11-2011, 04:01 PM
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

teedoff
11-11-2011, 04:05 PM
You could just add a style rule to remove the underline...


text-decoration: none;

BubikolRamios
11-11-2011, 04:08 PM
<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>

BSquared18
11-11-2011, 04:12 PM
Thanks, BubikolRamios.

That did the trick!

Bill



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum