Results 1 to 4 of 4

Thread: Need to display HTML code in an image ALT tag or similar?

  1. #1
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need to display HTML code in an image ALT tag or similar?

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Also, posted in the other thread (in the Javascript forum) about the tooltip suggestion.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. #4
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the information. They should keep me busy for a while.

    Apologies for the double post.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •