HTML and CSS Reference
In-Depth Information
Start with good defaults for your simple type selectors to form a baseline
that will make elements behave consistently regardless of where they
Then chunk more specific selectors by their location in the DOM or
what makes them unique, being just as verbose as you need to be to
describe and group the selectors and being specific enough to override
the defaults.
A selector such as div.header div form#quickSearch input[type=submit]
may be more specific than you need for the current site and cannot be
easily transferred to the next project you work on. Trimming the selector
to #quickSearch submit may still provide the specificity and readability
you need while being generic enough to reuse it.
#quickSearch label {}
#quickSearch input[type=text] {}
#quickSearch input[type=submit] {}
aside #quickSearch label {} /* adjust the properties for a
special case */
Search WWH ::

Custom Search