I'm wondering if there is a pure CSS way to add a class to elements of another class. The problem I'm trying to solve is below, which is also an example.
Using bootstrap, I have a number of elements that look like this:
<li class="nav-item">
<a class="nav-link" href="#">Law</a>
</li>
What I would like to do is add the pull-right
class to each element with the class nav-item
(I think), in order to make the nav items all float to the right.
Is there a pure CSS way to do this? I think the answer is no, at least without LESS/SASS/JS, but I'd love to be disabused of that notion.