Log in

View Full Version : Need to display HTML code in an image ALT tag or similar?



rjshearman
03-09-2007, 03:28 PM
Hi,

I am looking for a way to place HTML code in a popup message when a user hovers over an image.

Basically I want to put "<TABLE><TR><TD>1</TD></TR></TABLE>" inside an image ALT tag and have it displayed as HTML.

I have tried using CHR(9) (tab) and CHR(10) (new line) inside the image ALT tags to space my message but i'm not getting good enough results.

Does anyone know if this is possible?

Failing that is it possible to control which font is used in an Image's ALT tag?

Many thanks,
Richard.

jscheuer1
03-09-2007, 04:07 PM
The alt attribute (really in most browsers it is the title attribute) 'tool tip' behavior is mostly hard coded into each browser and varies slightly from browser to browser. There is little design control that can be gained over it. This index lists scripts that can be used to mimic this alt/title 'tool tip' behavior with considerably more control at the designer's disposal:

http://www.dynamicdrive.com/dynamicindex5/index.html

thetestingsite
03-09-2007, 04:09 PM
Also, posted in the other thread (in the Javascript forum) about the tooltip suggestion.

rjshearman
03-09-2007, 04:30 PM
Thanks for the information. They should keep me busy for a while.

Apologies for the double post.