0

I have some anchor links in my application which when disabled should look gray so I applied the following code in css file:-

a[disabled] 
 { 
    color: Grey !important; 
    text-decoration: none !important; 
 }

This seem to work fine but I want to exclude 1 link from taking this style when disabled. How can I do that?

pnuts
  • 58,317
  • 11
  • 87
  • 139

2 Answers2

0

try

a[disabled]:not(your selector) 
 { 
    color: Grey !important; 
    text-decoration: none !important; 
 }

e.g.

a[disabled]:not(:nth-of-type(2)) 
 { 
    color: Grey !important; 
    text-decoration: none !important; 
 }
Akhilesh Kumar
  • 9,085
  • 13
  • 57
  • 95
0

Looks your selector is wrong. It has to be

a[disabled=disabled]{
    color: Grey !important; 
    text-decoration: none !important;
}

JSFiddle

Reference

Community
  • 1
  • 1
sasi
  • 512
  • 4
  • 27
  • The link to exclude is asp:hyerlink. Do I have to mention its Id at the "your selector" here? Link to exclude code-" and there are more hyperlinks like that. They display like buttons so have to be excluded. – Neha Aggarwal Jun 02 '15 at 11:15