Anders Nawroth wrote:

Terrence Wood skrev:
Here's the easy fix: just remove the href attribute. An anchor element sans ANY attribute is perfectly acceptable HTML[3]. It inherits CSS as expected and doesn't appear in any link collection.


I've found that IE has problems when applying CSS to an anchor tag that has no href. It depends on whether you style the anchor on it's own ie. a { .... } or as a:link { ... } in the CSS, I think this method requires the former selector.


I use this a lot.

Still one problem:
Sometimes it is confusing, not beeing able to tab into the menu item.
(Like in a tree menu, where the current item is a folder in the menu.)
In that case I set the href to "javascript:;" and use a class or id to style it. (actually, I do this with client-side scripting, and have no href attribute in the markup)

/AndersN


I also find that instead of removing the anchor tag altogether, replacing it with another tag like <strong> or <em> provides the necessary CSS hook to keep the menu nice. The difference is also visible without extra CSS if its a plain list.

My two pence,
   Rob





*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to