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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

enter on title/alt

Status
Not open for further replies.

tcardoso

Programmer
Jan 31, 2005
56
PT
Hi,

I want to put a line feed on a title, is that possible?

<img title="text\ntext"...>
<img title="text<br>text"...>
These doesn't work...

P.S.- don't want to use tooltips, etc.. :)

Thanks
Telmo Cardoso
 
like this

Code:
<img title="text
text"...>

hard code the line break in your HTML document, it's messy but it does what you want.


[small]"Mom........MEATLOAF!!!! F***!!!!"[/small]
<.
 
tcardoso said:
I want to put a line feed on a title, is that possible?
Not that I'm aware of.

Keep in mind that different browsers do different things with the 'title' attribute. Firefox displays it when you hover over the element. IE does that with the 'alt' attribute.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
I stand corrected.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
I looked at my method. Works in IE, doesn't in FF.

[small]"Mom........MEATLOAF!!!! F***!!!!"[/small]
<.
 
Ok :)

thanks, I was doing like monksnake said :D but it doesn't work :) in FF and I don't like to see my code broken :D

Traingamer: IE and FF show title msg, IE shows alt but it shouldn't show :) because alt is an alternative :) only in the case of the image doesn't load it should be showed (FF does this).

P.S.- Thanks again both and sorry for my poor english :)
 
IE and FF show title msg, IE shows alt but it shouldn't show :) because alt is an alternative :) only in the case of the image doesn't load it should be showed (FF does this).
IE only shows the alt if title isn't supplied, so therefore I guess it is an alternative, alternative to title ;-)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
From W3C:

title = text [CS]
This attribute offers advisory information about the element for which it is set.

alt = text [CS]
For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute.

alt shouldn't appear in IE, only title! these are different things :) alt should only appear if the agent (object) cannot be displayd :)

P.S.- Ok, ok, i use alt sometimes myself :( I forget that FF doesn't display that :D damm
 
lol - you're talking should/shouldn't , I was merly pointing what I.E does.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top