CSS

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
style for all my <input type=button>. I have hundreds of them.
INPUT
{
FONT-SIZE: 11px;
COLOR: #000000;
FONT-FAMILY: Arial, Verdana
}
INPUT button
{
FONT-SIZE: 11px;
COLOR: #ffffff;
FONT-FAMILY: Arial, Verdana;
background-color: #ffcc99;
}
 
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.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
 
Kevin,

Thanks for the answer. How do you become a Professional Numbskull?


--
Arne Garvander
Certified Geek



Kevin Spencer said:
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.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
 
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!

--
Nyuck Nyuck Nyuck,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

Arne Garvander said:
Kevin,

Thanks for the answer. How do you become a Professional Numbskull?


--
Arne Garvander
Certified Geek



Kevin Spencer said:
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.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

message
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
style for all my <input type=button>. I have hundreds of them.
INPUT
{
FONT-SIZE: 11px;
COLOR: #000000;
FONT-FAMILY: Arial, Verdana
}
INPUT button
{
FONT-SIZE: 11px;
COLOR: #ffffff;
FONT-FAMILY: Arial, Verdana;
background-color: #ffcc99;
}
 
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.
 
I couldn't get FireFox to support it on an input element.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
 
Kevin said:
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; }
 
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!

--

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

Göran Andersson said:
Kevin said:
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; }
 
Back
Top