Forum Moderators: open

Message Too Old, No Replies

Firefox and Safari Differ with "title" in href

         

gardenguy

5:37 pm on Oct 22, 2006 (gmt 0)

10+ Year Member



Hi,
I am attempting to use the title attribute of href. I have read elsewhere that if on my keyboard I use the return key at desired locations the text in title will then wrap at the return so that I can place a fairly long tip or balloon or whatever you call it. When I do that it does as expected in Safari, but in Firefox the first return displays a box with an x in it, then a bit more text followd by dots when non returned single line of text gets to the end of the screen.
Clues welcome.

penders

7:32 pm on Oct 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have tried using the '\n' (newline escape in JavaScript) in the title attribute - as I have written out the title attribute using JS. This has the desired effect in IE6/Win (multiple lines in the tooltip), but in FF1.5/Win it is ignored - all appears on one line. It is also ignore by Opera 8, but Opera also displays the href link on the 2nd line of the tooltip.

penders

9:28 pm on Oct 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Rather than actually hitting the [RETURN] key on your keyboard, you can use the character entity 
 (carriage return) instead - maybe a bit neater in your source. This works OK in IE/Win, but again FF ignores it.

In FF there seems to be a limit to the length of the tooltip of about 90 chars (then you get the dots... ellipsis). In IE6, the limit is big! Although it is of fixed width in IE6 (about 300px) and when it reaches the top and bottom of the screen, it seems to flash and is unusable!