input type=text/radio/checkbox - can I treat them differently in my CSS?
Other than by adding class=
I mean
input type=text/radio/checkbox - can I treat them differently in my CSS?
Other than by adding class=
I mean
I've never seen this done (and I've personally tried). I believe you would have to have some JavaScript/jQuery run on the page post render to manipulate the classes of objects based on element attributes.
You can use input[type=text]
to do this. Old browsers might not support it though.
Yes you can
eg
input[type="text"]{
/*do something*/
}
and more
input[type="text"] {
font:bold 10px/12px verdana,arial,serif;
padding:3px;
}
input[type="button"],input[type="submit"] {
/* you know what to do */
}
YES!
With an awesome thing called attribute selectors:
input[type="text"] { width: 200px; }
Just change that text
there and you're good to go!
But note that these don't work on IE6, so you might want to take a look at the dean.edwards.name IE7.js :)
You can use the attribute selector, like this
input[type=text] { ... }
However, this is not supported in all browsers. Your safest bet is to use a class