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!

Comment box with mouse over

Status
Not open for further replies.

dominiopt

Technical User
Sep 10, 2001
75
PT
Sorry if i don't know the exact name for this ...
In one html page when we mouse over certain elements
appears one yellow box with some comments.
How can i do that in html code.
Thanks
Fernando
 
its an alt tag for images <img src=&quot;image.jpg&quot; alt=&quot;This is my picture&quot;>

[soapbox]
sleep is good
 
Hi guys,

It's better to use the &quot;title&quot; attribute for this.
You can use the &quot;title&quot; attribute for most HTML-tags and the &quot;alt&quot; attribute only for the <IMG> tag.

The &quot;alt&quot; attribute is for (alternative) text, displayed when an image is not loaded.
The &quot;title&quot; attribute is used for those popup boxes.

See Starway's post in thread215-383216 for a better explanation!
If you are interested, see my post in that thread to align the text in those popup's.

Here is an example for some HTML-tags where you can use the &quot;title&quot; attribute too:

<form>
<textarea title=&quot;this is a textarea&quot;></textarea><br>
<input type=&quot;text&quot; title=&quot;this is a textbox&quot;><br>
<input type=&quot;radio&quot; title=&quot;this is a radiobutton&quot;><br>
<input type=&quot;checkbox&quot; title=&quot;this is a checkbox&quot;><br>
</form>

Hope this helps,
Erik <-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
In addition to Boomerang's post, I'd like to tell that those special code entities are good only for IE. Other browsers behave differently: Opera just ignores them and shows title text in one line, Mozilla does the same but adds some other chars (that sometimes look as rubbish). So be careful.
Also, if you just want to write some text on several lines (without any other formatting), no any code entities needed, just press [Enter] in your code editor:

title=&quot;this comment press [Enter] here
will be shown on several lines. press [Enter] here
(IE-only, others display it as one line)&quot;

Also, I forgot to add that TITLE attribute is not supported by NN4 - it is just ignored there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top