Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Tooltip "universally accepted" linebreak character?

Tags:

html

firefox

I use \n to create a linebreak in web tooltip. This works in IE and in Chrome. But Firefox ignores it.

What will work universally as linebreak character in tooltip? Thanks.

like image 581
user776676 Avatar asked Jun 28 '11 05:06

user776676


People also ask

How do I display tooltip in multiple lines?

Multiline tooltips allow text to be displayed on more than one line. They are supported by version 4.70 and later of the common controls. Your application creates a multiline tooltip by sending a TTM_SETMAXTIPWIDTH message, specifying the width of the display rectangle.

How do you break a line in a tooltip title?

Just use the entity code 
 for a linebreak in a title attribute.

How do you add BR to a title?

You can use 
 or 
 .

How do you put a line break in a title tag?

<br>: The Line Break element. The <br> HTML element produces a line break in text (carriage-return).


1 Answers

Update: This has been cleared up in HTML5 using the title attribute. Now Firefox 12 supports it. Try this:

<span title="First line&#10;Second line">Test</span>

Bad news: Firefox does not line break tooltips. This is actually a non-standard html extension, ie a bug in MSIE that may cause problem with certain pages.

See this bug on the firefox issue tracker.

like image 125
vidstige Avatar answered Sep 28 '22 11:09

vidstige