|
Collected by Elizabeth Janson Home Page |
|
|
This "bubble" you refer to is kind of a pop-up textbox(usually yellow, done when you hold the cursor over the link for a few seconds right?) They are called Title Boxes.
Use <SPAN style="color:red" TITLE="bubble text">text with title</SPAN>, This section began with a page by Joe Burns of HTMLgoodies fame. He wrote This effect is really simple. In the example below, I use it to give an explanation for the word COBOL. I surround the word by a <SPAN> tag. To make the word stand out, I use CSS within the <SPAN> tag to make the word underlined and blue. The cursor is a hand when hovered over. Notice that I have inserted two non-breaking spaces after the word COBOL. <SPAN TITLE="COBOL is an acronym that stands for Common Business Oriented Language" STYLE="color: navy; text-decoration: underline; cursor: hand; background-image: url(question.gif); background-repeat: no-repeat; background-position: right;">COBOL </SPAN> Added COBOL (question mark is omitted, end added). The TITLE attribute can also be used inside any other tag. To describe a link, add it to the <A> tag. An example, from my Pioneers site, with status bar messages thrown in, too.<UL>
There are also a few options when it comes to formatting the text inside the tool tip. The command will insert a carriage return wherever it is placed. creates a linefeed (to my eyes, these two commands to the exact same thing. Correct me if I'm wrong). You can also enter tab spaces by using the 	 command. I also have to mention that there is a 1024 character limit for the tool tips. I think this is generous enough. If you need anything more, you may need to ask yourself if a tool tip is the right thing. Thanks Joe. And another thing - there needs to be no whitespace between the quote sign ending the tip, and the closing >.
When all else fails, combine TITLE and Java ScriptShort Long Medium Long No more messagesHere is the code behind those five examplesIn the <HEAD>
And where the items are wanted
<DIV ID="tooltip"></DIV> <A HREF="#" onMouseOver="showTip(this, 'Short tooltip')" onMouseOut="hideTip()">Short</A> <BR><BR> <A HREF="#" onMouseOver="showTip(this, 'Click here to see more cool tips! \n This is the second line...\n change line with backslash n..\n only works with IE')" onMouseOut="hideTip()">Long</A> <BR><BR> <A HREF="#" onMouseOver="showTip(this, 'The next tooltip uses TITLE instead')" onMouseOut="hideTip()">Medium</A> <BR><BR> <A HREF="#" OnMouseOver="window.status='Tooltips used in TITLE for IE'; return true;" TITLE='Click here to see more cool tips! \n This is the second line... fourth line, after skipping one line'>Long</A> <BR><BR> <A HREF="#" onMouseOver="showTip(this, 'No ')" onMouseOut="hideTip()">No more messages</A>
|
|
Email CSS begins here |
|
This page is part of Elizabeth Janson's web site
http://www.oocities.org/elizatk/index.html
Tetbury residents in the Eighteenth Century my Australian Family History and Barrie, our Family Poet. |