Forum Moderators: open

Message Too Old, No Replies

Disabled anchor style

         

nibbler

1:26 pm on Nov 8, 2006 (gmt 0)

10+ Year Member



Hi
I have a number of anchor tags which are disabled in the HTML (disabled="disabled") to avoid tabbing. But the result is that in IE the anchor text ignores the CSS font colour and renders the text in grey. I haven't been able to find away to change the colour. Does anyone know how I can do this while keeping the anchors disabled?

Thanks

Robin_reala

1:40 pm on Nov 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



@disabled only applies to form elements, not to links. You could hack up a bit of Javascript to blur the links onfocus, but that's very likely to cause usability and accessibility issues. Can I ask why they're links if you don't want people to be able to use them? Could you not just turn them into spans or something?

nibbler

1:53 pm on Nov 8, 2006 (gmt 0)

10+ Year Member



The anchors are used for help pop-up messages using CSS alongside a form. Guess it could be changed to use p with spans, but could be quite a bit of work. Was hoping there might be an easier way.

nibbler

2:06 pm on Nov 8, 2006 (gmt 0)

10+ Year Member



Actually... do have to use anchors to get the :hover psuedo-class to work as it doesn't on any other element in IE6.

Robin_reala

2:22 pm on Nov 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So you don't want keyboard users to be able to see your popups?

nibbler

2:45 pm on Nov 8, 2006 (gmt 0)

10+ Year Member



It's a good point, I'm going to raise it with the project manager who made the decision. But it's one of the minor useability / accessibility issues caused by using Visual Studio 06, which creates some awful bloated XHTML.