# Applying styles to elements under an element

**URL:** <https://forum.kirupa.com/t/applying-styles-to-elements-under-an-element/255384>\
**Category:** web dev\
**Created:** [March 21, 2008, 8:55pm UTC](https://forum.kirupa.com/t/applying-styles-to-elements-under-an-element/255384 "2008-03-21T20:55:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeron](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@aeron](https://forum.kirupa.com/u/aeron)\
**Post date:** [March 21, 2008, 8:55pm UTC](https://forum.kirupa.com/t/applying-styles-to-elements-under-an-element/255384/1 "2008-03-21T20:55:09Z")

</div>

```auto
<div class="test">
  Lorem ipsum <a href="other.html">dolor</a> sit amet.
</div>

```

Is there any way to style ONLY the a’s that are within “test” elements? (Other than giving “a” a class).

Just so you know, I have a lot of occurrences like this and I’d like to change them all with css rather than hunt down each one in the html.

Thanks!
