Learn How to Do-It-Yourself!

How to Add a Line Break to a Tooltip


It's really easy to add line breaks to a HTML ToolTip tag.  To add the line break simple use either the 
 entity or in some cases the \n escaped newline character will work.

In a regular HTML page the ToolTip title tag would look like the following when creating a line break:

title="First: We will break the line here 
 Second: then continue on this line."

In ASP.NET the tooltip line break uses \n and would look like this:

ToolTip="First: We will break the line here \n Second: then continue on this line."

I have only tested this in Internet Explorer 7, so you will want to test this out in Firefox and Safari as well. To test Hover Over This.

Keep in mind there may be a limit to the number of characters you can have in a Tooltip.
 

 


_______________________________________
Save this  Email this  |  Digg this!  |  del.icio.us  |  RSS 

Add your comment

by Anonymous - Already have an account? Login now!
Your Name:  

Title:  

Comment:  
Join now for free to keep track of all your comments and have them appear instantly.

Sponsored Links

Search for keywords: