Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Targeting a single element with CSS Reply To: Targeting a single element with CSS

#182311
chrisburton
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">)