Home › Forums › CSS › [Solved] what's difference between these selectors ? › Reply To: what's difference between these selectors ?
.selector will usually be enough.
There should never be a need for
div#header) because the
# is an ID and should be unique on the page.
You might occasionally see
div.selector but this usually only where the class is quite general and could be applied to multiple element types.
div.selector would apply only to divs with that class but
.selector would apply to ANY element with that class whether is was a div or not.