+ 4
How do I stop a selector in css from affecting other in html
I have formatted a link in the body using css and i didn't want the same thing with the footer but yet it keeps giving me the same thing
9 Réponses
+ 4
depends on ur requirement.
to target only one link then use an id,
to target a group of links then go with a class
or go with grouping selectors.
+ 2
use an id? or a class?
+ 2
I'm a rookie, I don't think I know how to do that
+ 2
use id and class for html elememt and utilize it properly with proper way definitely you dont have to faceany type of problem which u asked?
+ 1
oh I get, Thanks Max
+ 1
we USE these brackets in CSS
{ }
YOU NEED TO CLOSE THE BRACKET TO STOP A SELECTOR FROM AFFECTING OTHER HTML ELEMENTS
+ 1
an id attribute will definetly work
0
add to you link the attribute class="myclass"
and in your css use #myclass{...}
instead of a{...}
0
End curly bracket }