asp.net - Can I get a stylesheet to detect a custom tag on a page element? -


Can I get a stylesheet to find a custom tag on a page element?

I like to add some functionality to a stylishet that can detect the disabled = "disabled" attribute on a link button and make it gray.

[UPDATE]

Great suggestion it does not display disabled buttons effectively as being gray in Firefox and Google Chrome. The following is what I put in style sheet and now all my link buttons present correctly.

  one [disabled] {color: Gray! Important; Text-decoration: None! Important; }  

You can use the CSS2 selector (if the browser supports it. ) On the tag property to display the basis of style but I showed some problems when I was using "disabled" property in IE8 The default IE8 display tag that has been disabled by gray (stylesheet can not change it).

FF3 display green hyperlink, with the following code. But IE8 display gray hyperlink

  & lt ;! DOCTYPE HTML PUBLIC "- // W3C / / DTD HTML 4.01 // N" "http://www.w3.org/TR/html4/strict.dtd" & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Ask a question - Stack Overflow & lt; / Title & gt; & Lt; Style & gt; A [disabled = "true"] {color: green! Important; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; A href = "www.microsoft.com" disabled = "true" & gt; Microsoft site & lt; / A & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Comments