Previous Message
Next Message

Pure CSS Tooltips

Sent by Andy Budd on 29 January 2005 05:05


Christian Heilmann wrote:

> Please don't. Javascript links are dead markup, and so are links 
> without an href. We tried for years now to keep HTML clean and remove 
> all the inline Javascripts the "DHTML mania" beginning of the 
> millenium gave us, now we repeat the same mistake to cater for CSS 
> effects...

> If the link  is to point nowhere, don't use a link, but another 
> element.

I couldn't agree more. Fix the problem, not the symptoms.

If the element doesn't link to an external page or an anchor within the 
page then don't use an anchor link.

I actually question the use of CSS to create such behaviours as they 
seem more suited to JavaScript. There are a number of way you could do 
this using JS. For instance if you wanted to use a link, it could point 
to a page with your tool tip text. However if the user has JS enabled 
you could change the behaviour of the link (make it null) and display 
the text as a tooltip. Alternatively with JS you could dynamically add 
the question marks, making them hoverable but not clickable. I guess 
you could even add a null link using JS if you wanted as at least it 
wouldn't be in the markup, so would keep your HTML clean of meaningless 
code.



Andy Budd

http://www.message.uk.com/

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

Possibly related: