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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

line break

Status
Not open for further replies.

seanbo

Programmer
Jun 6, 2003
407
GB
i have a hyperlink with a tool tip.

<a href=&quot; target=&quot;_blank&quot; title=&quot;line oneline two&quot;>click me</a>

how can i add a line break between 'line one' and 'line two'?

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
seanbo,

Although I can't seem to do the job using HTML only, using JavaScript I cna get it working in IE only:

Code:
<HTML>
<HEAD></HEAD>
<BODY onLoad=&quot;document.getElementById('myLink').title = ' Line 1 \n Line 2 ';&quot;>
<A ID=&quot;myLink&quot; HREF=&quot;&quot;>abc</A>
</BODY>
</HTML>

Hope this helps!

Dan
 
I just tested your link in IE6 and Netscape 7.1 and breaks show up
 
mr bond's solution seems to work fine, i think i'll stick with that one (as long as it works in safari, anybody know?).

none of those backslash suggestons seem to work, and i don't think overlib has the right feel - but thanks to everyone.

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
[tt]&quot;and i don't think overlib has the right feel&quot;[/tt]

But does it allow you to do what you're looking to accomplish??
 
...it does indeed - probably even tidier than the one triggered by title - - but i don't like to make things look different unless there's a bloody good reason (it detracts from the functionality of the page).

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
javadude, \r \n \0 \a and the like are programing language escape codes, the only reason they exsist is because there wasn't a good way to put them in a string in a programing language without multi-line literals... In HTML the options are tags or amp-code-semi combinations like &quot;&lt;&quot; I think that you can code a return or line break in this fashon, and that might be the solution you need.... but newline/feedline or return aren't listed in the codes... hmmmmmmmm....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top