What would be the proper CSS selector to target the following tag:
<nav class="twelve-col col main-menu">
Would the proper selector just be:
.twelve-col col main-menu {
}
What would be the proper CSS selector to target the following tag:
<nav class="twelve-col col main-menu">
Would the proper selector just be:
.twelve-col col main-menu {
}
No. You should combine individual class names using .
:
.twelve-col.col.main-menu
No. Your selector is trying to find main-menu
INSIDE col
which is INSIDE twelve-col
. But you are looking for element, that has twelve-col col main-menu
classes the same time, so use .twelve-col.col.main-menu
However try BEM methodology, where you use just one class to make all your selectors same specificity (http://getbem.com)
The most effective selector will be nav.twelve-col.col.main-menu
you can also use nav.main-menu
which makes some sense.