If the elements are positioned next to each other, you can achieve this using an adjacent sibling combinator (link) by creating a rule that hides the second element and then another rule that displays it with the combinator:
selector-for-the-second-element {
display: none;
}
selector-for-the-first-element + selector-for-the-second-element {
display: block;
}
Live Example:
.second {
display: none;
}
.first + .second {
display: block;
}
<div class="first">This is first</div>
<div class="second">This is second</div>
<hr>
<div class="second">This is second with no first</div>
If the elements are siblings but not directly next to each other, you can use the general sibling combinator (link) in a similar way:
selector-for-the-second-element {
display: none;
}
selector-for-the-first-element ~ selector-for-the-second-element {
display: block;
}