Multiple classes are good; it was ages before I realised you could do that. Note that VS 2005 shows multiple classes in a CSS file as an error, when it's not. Ie, if you do .foo.bar as a class name, it's flagged - just ignore the error.
For context I mean using the inheritence and child selectors. So:
-
div input - an input below a div, at any level
-
div > input - an input directly below a div
-
div + input - an input next to (ie a sibling) of a div
Classes apply here too, so:
So you might be able to use the context within which some of your textboxes sit to avoid having to add additional classes. You can also select on attributes:
-
input[type="text"] - a text input; ie where the 'type' attribute has a value of 'text'
-
input[id^="text1"] - a textbox where the id starts with 'text1'
-
input[id$='text1] - a textbox where the id ends with 'text1'
-
input[id*='text1'] - a textbox where the id contains 'text1'
Attribute selectors are really useful for targetting specific controls, especially the contains one when using ASP.NET text box controls in a control tree hierarchy (user controls or master pages) and the ID is munged to include the parent controls.
d