Jonathan N. Little wrote:
> Is it possible to set a style for just one type?
Yes
input[text] {...}
No, the correct syntax is
input[type="text"] {...}
The selector input[text] would match an input element with an attribute
named text, i.e. <input text="..." ...>, and there's no such element of
course.
But, before you get too excited, realize that IE does not support
attribute selectors...
IE 7 does, in "standards" mode.
Interestingly, IE 7 interprets that the selector also matches an input
element with no type attribute, apparently based on the idea that
type="text" is the default. I think this violates the specifications, since
the selector should match only an element that actually has the attribute
type="text" in markup. Firefox seems to agree with me.
Of course, independently of such support issues, a text input element should
always have the size="..." attribute, so that its size is at some level
defined even when CSS is off; see the CSS Caveats,
http://www.cs.tut.fi/~jkorpela/css-caveats.html
--
Yucca,
http://www.cs.tut.fi/~jkorpela/