Previous Message
Next Message

"Tool tip" on hover?

Sent by Christian Heilmann on 3 January 2005 14:02


> First posting to this mail listing so....
>
> I based the tooltips on my site on those of Eric's but rather than 
> have the tooltip appear in a single location I have each tip appear at 
> a fixed offset to the element.
>
> http://www.aqvi55.dsl.pipex.com/
>
> The HTML is:
>
> <div id="links01"><a href="index.htm">Main Section page<span>To the 
> front page</span></a></div>
>
> and the corresponding CSS is:
>
> #links01 a span{
>   display: none
> }
> #links01 a:hover span {
>   border: #000 1px solid;
>   padding: 5px;
>   display: block;
>   z-index: 200;
>   background: #ffffcd;
>   left: 230px;
>   margin: 10px;
>   font: 10pt verdana, sans-serif;
>   width: 200px;
>   color: #411;
>   position: absolute;
>   top: 20px;
>   text-align: left
> }
>
> There are two problems with this method:


The other problem is that you simulate a perfectly good attribute 
behaviour with markup. A user without CSS or with  a screen reader will 
see/hear "Main Section to the front page" which  does not make much 
sense. A script like nicetitles uses the title attribute to do exactly 
what you want to achieve. If you want to go the way mentioned above, you 
also need to ensure that the content of the link makes sense as a whole.


______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: