Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<a title=...> 1

Status
Not open for further replies.

forrozeiro

Programmer
Sep 1, 2001
38
BR
Hi,

Using the code <a title='description'>desc</a>, I get a square with the text 'description' whenever I put the mouse pointer over 'desc'. Is there a way I can insert line breaks or tabs into the text that is poped up to the user ? Something like:

<!-- this doesn't work -->
<a title='description\nbla\tbla'>desc</a>

And the result being:

description
bla bla

Thank you in advance.
 
Code:
<a title=&quot;Hi!

Welcome to my site! I hope you enjoy being here.

Click this link if you want... Just make sure you come back!&quot;>Desc</a>
bluebrain.gif
blueuniment.gif
 
Unfortunately, this is IE-only solution.
Insert & # 1 0; (without spaces) where you want to break the line.
Code:
<a href=&quot;#&quot; title=&quot;search criteria:& # 1 0; word & # 1 0; phrase&quot;>smth</a>
It's upon to you to deside wherether to use it or not, just rememeber: Opera 5+ shows extra whitespace instead of it, Netscape 4.x doesn't recognize &quot;title&quot; at all, and Netscape 6 shows ? instead of it.
 
Yes... you could use the &amp;#10; solution. But, it's so much easier just to use the normal ENTER (and it has exactly the same effect).
bluebrain.gif
blueuniment.gif
 
I'm interested how do you plan to do this while writing html code.

 
I use this on my website, it ties in with CSS mouseover white box's that highlight text on a link and provides addition info, with the title=&quot;free beer&quot; etc.
 
I use this on my website, it ties in with CSS mouseover white box's that highlight text on a link and provides addition info, with the title=&quot;free beer&quot; etc.
 
Sorry for the double posting, click happy, here's a line from my page,

<a href=&quot; link&quot; title=&quot;950+scripts here&quot;><font color=&quot;006699&quot;>JavaScripts</a><br>
 
Thank you guys for your help!
I'll use the & # 1 0 ; solution. I´ve tested it and it worked fine. I cannot simply use the enter from keyboard ( as some of you suggested) because the application I am working on uses internationalization. All the text that appears to the user come from a resource bundle file (a .properties file, that uses the linebreak as a separator), it's not inserted directly on the HTML code (I am using JSP).
Thank you again and sorry for my English.
forrozeiro.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top