Previous Message
Next Message

"Tool tip" on hover?

Sent by Bob Wightman on 3 January 2005 16:04


Christian Heilmann wrote:

>
>> 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.
>
I am currently having difficulty accessing the kyrogenix website so I'll 
take your word on the nicetitles script. I was trying not to use 
scripting for navigational items even though the content of some 
sections relies heavily on that very same scripting.

I originally used the title attribute. Then I looked at the site in 
Opera- oh dear! Rather than seeing something like - "Back to the home 
page" as per IE and Firefox, the text appeared as "Title: Back to the 
home page. Address: x/y/z". Not what was intended at all. Hence the 
approach above in which I can at least have identical cross browser 
behaviour.

I take your point about the text within the span not reading correctly 
when seen from the viewpoint of a screen reader and will have to do 
something about that.

Thanks for the comments.

Bob


______________________________________________________________________
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: