Member Avatar for ingeva

I have tried to insert a linefeed in the "title=" text in an <img> tag.

Both \n and <br /> are shown exactly as written.
Is there a trick to make it actually break the line?

From what I have read, there shouldn't actually be new lines in the title attribute. BUT if you do want to try, use "&#13;" which is a carriage return. In firefox, the return is converted to a space, but in IE you will see a line break in the tool tip (which I think is incorrect behaviour).

Hope that helps...

Member Avatar for ingeva

From what I have read, there shouldn't actually be new lines in the title attribute. BUT if you do want to try, use "
" which is a carriage return. In firefox, the return is converted to a space, but in IE you will see a line break in the tool tip (which I think is incorrect behaviour).

Hope that helps...

Thanks, I tried that, and you're right: In FireFox it's just a space.
There should be a better solution, but I guess I'll just not show any title but open a small message box instead.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.