Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple lines in title

Status
Not open for further replies.

MJB3K

Programmer
Jul 16, 2004
524
GB
Hi, i was wondering how you get multiple lines in the title tag of a <td> or <img>??

<td title="Price: £35">

I dont know how to put stuff under it in this format:

Price £35
From: username
Date: date
.... etc

Is this possible?


Regards,

Martin

Gaming Help And Info:
 
I'm not sure about using plain HTML, or making a cross-browser solution... But in IE, it is certainly possible to do it with JavaScript:

Code:
<html>
<body onload="document.getElementById('myspan').title = 'abc\ndef';">
	<span id="myspan">abc</title>
</body>
</html>

Your best bet might be to use JavaScript and write a DHTML solution... or to check out - as I'm sure they already have plenty of cross-browser ones already available.

Hope this helps,
Dan


The answers you get are only as good as the information you give!
 
If you like easy customizable JavaScript tooltips with the support for multiple lines et al:
If you are looking for plain tooltips with title, like Dan said, IE supports those, other browsers don't. If IE support is enough for you, you should do it easier though (without JS):
Code:
<td title="Price £35
From: username
Date: date">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top