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.

example here

.left a:not([class]) {     color: #00f; } .right a:not([class]) {     color: #f00; } 

Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -