CSS - How can I make a custom tooltip when hovering on text?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Josh1billion
Forum Contributor
Posts: 316
Joined: Tue Sep 11, 2007 3:25 pm

CSS - How can I make a custom tooltip when hovering on text?

Post by Josh1billion »

I know it's possible to do with images (see tutorial, scroll down to see example on page), but is it possible to use this same technique on simple text? I barely know any CSS which is why I'm asking if that idea would be possible.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

Depends what you mean by tooltip.

CSS alone? I don't think its possible.

Code: Select all

<a title="Tooltip">Text</a>
Or you can use javascript to emulate a tooltip, which there are plenty of scripts that do so.
User avatar
Josh1billion
Forum Contributor
Posts: 316
Joined: Tue Sep 11, 2007 3:25 pm

Post by Josh1billion »

Interesting, I see some examples of kinda what I was aiming for now with Javascript. But now I can't remember what I wanted this in the first place for, heh, I'll probably remember later.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I've used overlib for years for custom tooltips. If you're using JQuery, there's a Tooltip plugin you can use too.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply