How can I use a carriage return in a HTML tooltip ?

Posted by ip on Stack Overflow See other posts from Stack Overflow or by ip
Published on 2008-12-11T10:11:55Z Indexed on 2010/03/26 12:23 UTC
Read the original article Hit count: 187

Filed under:
|
|

Hi,

I'm currently adding verbose tooltips to our site, and I'd like (without having to resort to a whizz-bang jQuery plugin, I klnow there are many!) to use carriage returns to format the tooltip.

To add the tip I'm using the 'title' attribute. I've looked around the usual sites and using the basic template of:

<a title='Tool?Tip?On?New?Line' >link with tip</a>

I've tried replacing the '?' with:

  • <br />
  • &013; / &#13;
  • \r\n
  • Environment.NewLine (I'm using C#)

Neither work. Is it possible ??

WOW! Thanks all - 6 different answers in less than an hour. Thanks indeed!!

© Stack Overflow or respective owner

Related posts about html

Related posts about tooltips