newline in firefox alt / title

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I was wondering how I can solve the following :

when i use line breaks in the title ort alt attribute in firefox, I'll get
weird-signs. In internet explorer it works, only firefox let's me down:

Sample code :

<img src="steppenwolf.jpg" title="Nl : steppenwolf\nEn : Wolfman">

You can view the image how it is displayed in Firefox 1.0.2 (windows xp)
here :

Thanks in advance,

Re: newline in firefox alt / title

geradeaus wrote:

Quoted text here. Click to load it

There is no way to force line-breaks in tooltips. Try using some sort of
Javascript rollover instead.

Here's an example, which could probably be refined by someone more
knowledgable of Javascript than I:

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Re: newline in firefox alt / title

Quoted text here. Click to load it

Line breaks work unreliably inside attribute values, and the
specifications are fuzzy on this matter. Avoid them, or at least don't
rely on any particular rendering. Assume that a line break inside
an attribute value should be equivalent to a space but browsers may
get this wrong.

Quoted text here. Click to load it

Several comments:
1. It's invalid markup; the alt attribute is missing. (If you omit it
   for brevity, why include the src attribute?)
2. You didn't post the URL of the page where you have the problem.
   Do you want to solve the real problem, or the technical problem
   you've created in a wrong approach?
3. The string \n is just a string in HTML, with no specific meaning.
   You may have meant that some program has such a string in
   a print statement. But you didn't say it.
4. The title="..." attribute is advisory only. Don't put anything
   there that _needs_ to be communicated to the user.
5. Language changes inside attributes violate accessibility      
   recommendations, since there is no way to indicate them in markup.
6. Don't abbr more thn u need 2. Spell out language names, unless
   there's a good reason to use codes.
7. Are you sure "steppenwolf" is "Wolfman" in English? Which English?
Yucca, /
Pages about Web authoring:

Site Timeline