
Signature
Arne Garvander
Certified Geek
CSS 2 defines an attribute selector:
INPUT [type=button]
However, I know of no browsers that support this. Instead, I'm afraid you'll
have to use a class:
INPUT
{
FONT-SIZE: 11px;
COLOR: #FF0000;
FONT-FAMILY: Arial;
}
INPUT.alt
{
FONT-SIZE: 12pt;
COLOR: #00ffff;
FONT-FAMILY: Arial, Verdana;
background-color: #ffcc99;
}
(NOTE: I changed the inner styles so I could see the differences better)
I know it's a pain to have to add a class to all input elements that are
buttons, but there you are. In addition, you can use this class on other
input types if you want them to have the same style.

Signature
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
> Is there a news group for CSS?
> I can set the style for INPUT but I don't have a good way of cascading a
[quoted text clipped - 12 lines]
> background-color: #ffcc99;
> }
Arne Garvander - 28 Apr 2006 17:03 GMT
Kevin,
Thanks for the answer. How do you become a Professional Numbskull?

Signature
Arne Garvander
Certified Geek
> CSS 2 defines an attribute selector:
>
[quoted text clipped - 39 lines]
> > background-color: #ffcc99;
> > }
Kevin Spencer - 28 Apr 2006 23:14 GMT
> Thanks for the answer. How do you become a Professional Numbskull?
Actually, I'm a Most Valuable Professional Numbskull, but I try not to
flaunt it. ;-)
Interesting that you should ask. My wife bought me a 3 Stooges t-shirt for
my 50th birthday. One of the things I really liked about it was a disclaimer
that said (in part) that the stunts should not be attempted, as they were
done by "Professional Numbskulls." I liked the sound of it, so I "borrowed"
it!

Signature
Nyuck Nyuck Nyuck,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
> Kevin,
>
[quoted text clipped - 45 lines]
>> > background-color: #ffcc99;
>> > }
Chris Chilvers - 29 Apr 2006 03:26 GMT
>However, I know of no browsers that support this. Instead, I'm afraid you'll
>have to use a class:
Firefox supports it as I've played with it in the past (it also supports the :hover psedo element on any tag).
Unfortunatly most of the world uses IE which is still to bring in CSS2 support, then you can't rely on people having an
uptodate browser. So it's a few more years yet before we can start using this syntax.
Kevin Spencer - 29 Apr 2006 13:19 GMT
I couldn't get FireFox to support it on an input element.

Signature
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
>>However, I know of no browsers that support this. Instead, I'm afraid
>>you'll
[quoted text clipped - 6 lines]
> uptodate browser. So it's a few more years yet before we can start using
> this syntax.
Göran Andersson - 29 Apr 2006 17:27 GMT
> I couldn't get FireFox to support it on an input element.
Then you probably just mistyped something.
Ugly yellow button:
input[type="button"] { background: #ff0; }
Kevin Spencer - 30 Apr 2006 13:11 GMT
Hi Göran,
Very odd. I must have. Because yesterday I couldn't get it to work in
FireFox, but copying and pasting your code, as well as your code with the
quotes removed, works in FireFox!

Signature
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
>> I couldn't get FireFox to support it on an input element.
>
[quoted text clipped - 3 lines]
>
> input[type="button"] { background: #ff0; }