Kamis, 28 November 2013

CSS Input Type Selectors - Possible to have an “or” or “not” syntax?

If i have a HTML form with the following inputs:
 type="text" />
 type="password" />
 type="checkbox" />
I want to apply a style to all input's that are either type="text" or type="password".
Alternatively i would settle for all input's where type != "checkbox".
Seems i like to have to do this:
input[type='text'], input[type='password']
{
   // my css
}
Isn't there a way to do:
input[type='text',type='password']
{
   // my css
}
or
input[type!='checkbox']
{
   // my css
}
Had a look around, and it doesn't seem like there is a way to do this with a single CSS selector.
Not a big deal of course, but im just a curious cat.
Any ideas?

Tidak ada komentar:

Posting Komentar