I tried searching google and here for this, but I find everything else except it...
What I want to do is specify the background color for all the html buttons on the website. You know input type="button" or type="submit" ?
However when I use the css:
This changes the color of my text fields too, is there a way to specify for the input just to make it apply to buttons, or do I need to simply make a button class and specify it on all the buttons?
In theory you could use an
In theory you could use an attribute selector, in reality probably simplest to use a class if you want this to work cross browwser, you could also script it based on attribute.
I believe firefox3 has
I believe firefox3 has support for attribute selectors however I had no luck there with it. I am going to just use classes for compatibility, but still would like to know how to do this with selectors, I think I am trying to use the wrong child maybe. :shrug:
Wouldn't it just be better to make a button? Then you could choose your color/font you want as well.
Yes if this is an input
Yes if this is an input type=submit then perhaps the button tag with img tag is the best approach