I have a page that contains several divs with the classname row
.
<section>
<div class="row"> [...] </div>
<div class="row"> [...] </div>
<div class="row"> [...] </div>
</section>
I want to target the first of these so that I can apply certain spacing to them.
section div:nth-of-type(1) {
margin-top: 10px;
}
However, in some cases, the div I want to affect is not actually the first div in the section. It's the first div after a div that contains a noscript
tag.
How can I ensure I am targeting the correct div in this case? And are there better approaches?