POV-Ray : Newsgroups : povray.general : Re: Doc question : Re: Doc question Server Time
10 Aug 2024 15:17:08 EDT (-0400)
  Re: Doc question  
From: Charles Li
Date: 1 Dec 1999 22:30:15
Message: <3845e7c7@news.povray.org>
In HTML 4, there's a better solution.  They added the TITLE property to the
<A HREF> tag, it's there for graphical browsers that display those tooltip
things.  So you can use <A HREF="blah" ALT="what you want non-graphical
browsers to see" TITLE="what you want graphical tooltips to be">
without any conflict between ALT and a tooltip.

Charles Fusner <cfu### [at] enternet> wrote in message
news:3844843E.16916E6B@enter.net...
> Peter Popov wrote:
> > Try this:
> >
> > <A HREF="" ALT="A cute little tip popping up...">Point your mouse
> > here</A>
> >
> > Of course, if you don't want it to look like a link you'll have to
> > fiddle with CSS or font settings (I will try the latter and see if it
> > works, haven't done it in years).
>
> Almost. ALT is a property of images, not HREFs. Originally to
> specify an alternate text to display on non-graphical browsers,
> some browsers will now display ALT text as a tooltip when you
> hover over the images (whether or not they are links).
>
> If you want tips to show up when you put the mouse over a link
> though, there is a very easy trick with javascript that is
> pretty commonly used on the web. It writes your tip to the status
> line in place of the URL of the link. To invoke it, do something
> like this:
>
> <a href="./testpage.html"
>  onMouseOver="window.status='Jump to the test page'; return true;"
>  onMouseOut="window.status=''; return true;">
>  Test
> </a>
>
> window.status sets the status line of the browser to contain
> the specified text on mouseover, then clears it when the mouse
> moves on. This doesn't work with <SPAN> or <A name=...> tags,
> unfortunately, but here's a roundabout but workable way to
> use this trick with text in a non-link (well, sort of, but
> it's actually faking it).
>
> The style sheet declaration (unless you already use an external
> CSS file for your styles, use this inside the <HEAD> of your
> HTML file):
>
> <STYLE type="text/css">
>     A.Tips { text-decoration: none; color: #0000FF; }
> </STYLE>
>
> This declares all "A" tags of the class "Tips" to be non-
> underlined and blue. Now write your "links" like this...
> <a name="#here"></a>
> <a href="./thispage.html#here" class=Tips
>     onMouseOver="window.status='...Brings up this comment'; return
> true;"
>     onMouseOut="window.status=''; return true;">
>  This text...
> </a>
>
> Example above assumes you are on a page called "thispage.html"
> so if your visitor clicks your flagged text (which you didn't
> mean to be a link) it'll just loop him back to the current point,
> no harm done. The text will be blue, but not underlined, and will
> still display the status line text onMouseOver and clear it
> again on MouseOut.
>
>
> Charles
>
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.