Hey this is probably a dumb question but i can’t seem to find a straight answer.
How can i, for example, affect all the anchors in a class?
I’ve tried :
a.classname
and
.classname a
But don’t seem to work.
Can Anyone give a straight answer for me and other future googlers?
a.classnameis all<a>tags with a class of"classname"..classname ais all<a>tags that are a child of an element with class"classname".DEMO: http://jsfiddle.net/HTxeQ/
NOTE: If you have a more specific CSS rule elsewhere, it may overwrite that rule.
For example,
body .classname awould overwrite.classname a.DEMO: http://jsfiddle.net/HTxeQ/1/