Is there a way to write style rules that will only affect text fields. Suppose I have the following:
<div id="helloDiv">
<input type="text" name="something" /><br />
<input type="checkbox" name="somethingElse" /><br />
<input type="submit" name="go" />
</div>
div#helloDiv input {
border: 1px solid red;
}
The problem with the CSS rule above is that it will affect ALL input fields, not just text input, but also radio buttons, submit buttons, etc.
So, is there a solution with a transverse browser that affects only one type of input field in a div element or another element (without resorting to assigning input field styles separately).
James source
share