css - Set the default color of a link within a container, without overriding other rules? -
i have 2 containers: left , right
i'd set default color of links in left blue , right red
this not want:
.left { color: #00f; } .right { color: #f00; } the reason don't want that, because snippet overwrite every other color a tags due css specificity rules. see jsfiddle -- http://jsfiddle.net/jvanasco/q4oxmpxc/ -- in color bootstrap's label class gets overridden
is possible achieve want?
one option select a elements without class. achieve combining :not() pseudo class , the attribute selector [class].
in doing so, negating anchor elements with class.
.left a:not([class]) { color: #00f; } .right a:not([class]) { color: #f00; }
Comments
Post a Comment