Home › Forums › Design › Targeting a single element with CSS › Reply To: Targeting a single element with CSS
September 8, 2014 at 11:07 pm
#182311
Participant
You’re targeting all anchor elements (<a>
). You can simply add the parent element before the anchor in CSS.
So instead of
a {color: blue;}
which targets every link:
You can do
.rememberme a {color: blue;}
This only targets the links within a class of ‘rememberme’ (<div class="rememberme">
)