Is there a difference between .class element and element.class in a CSS selector?
I had always been shown element.class but just the other day came across a CSS file at work that had .class element and wanted to know if this was just a style choice (in which case I would make my changes match), or if there was a specific reason (in which case I would not necessarily want to make my changes match).
element.classselects all<element />s with that class..class elementselects all<element />s that are descendants of elements that have that class.For example, HTML:
For example, CSS: