Jump to content

Line break in tool tips


SmokingMan
 Share

Recommended Posts

I have a title in an image attribute that is too long to display completely. Is there a way to force a line break in a tool tip so it can span two or three lines? Waht are the limitations on the length of a "title" attribute?Inquiring minds want to know :)

Link to comment
Share on other sites

Well, you could use carrige return, line feed or another sort of character to add a new line over that text. It works in IE, and for a moment it seemed to work for Firefox when I tryed it. It doesn't work in Opera though.

<img src="image.jpg" title="First line 13;second line" />

Look at the ASCII reference for more info.(remove the space after the sharp. I've added it because otherwise the board creates a carrige return in the post rather then outputting the text)

Link to comment
Share on other sites

A title is not a tooltip by the way, the title should describe the content that it is related to. If you want to have your own tooltips you can use a Javascript library to show them. Walter Zorn has a good tooltip library.http://www.walterzorn.com/tooltip/tooltip_e.htm
I stand corrected. I wrote that after about two hours of writing code, staring at my monitor, and my third glass of Sangria. :) I meant multiple lines on the title, and what the limitations on the title are as far as length goes. I'll check out the link, and try to stay away from the wine after looking at a monitor for too long. :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...