How can I display the HTML "title" attribute in multiple lines in Firefox? [duplicate]
Possible Duplicate:
How can I use a carriage return in a HTML tooltip?
I would like to displ开发者_开发知识库ay the "title" attribute tooltip in several lines, so it looks like this:
Line 1
Line 2
I tried to do:
<div title="Line 1\nLine 2">Secret</div>
but it didn't work.
Is that possible?
You can enter
. In other words:
<div title="Line 1 Line 2">Secret</div>
As stated in How can I use a carriage return in a HTML tooltip? you can just do it like this:
<div title="Line 1
Line 2">Secret</div>
Though it is said that it doesn't work with Firefox.
Either add new lines within the HTML content itself
<div title="Line 1
Line 2">Secret</div>
Or make your own tooltip using JavaScript and CSS.
精彩评论