I have the following HTML, and I want to hide the element with the href
that points to #something_else
if its first sibling (or the first child of the parent element) has the class string
.
<div class="description">
<span class="string">blah</span>
<a class="link" href="#something">blah blah</a>
<a class="link" href="#something_else">blah blah blah></a>
</div>
I know this is possible using JS / jQuery, e.g.
if ($('.description').children().first().hasClass('string')) {
$('a[href="#something_else"]').hide();
}
but it possible with only CSS?