I've been trying to get my css to select the 'correct' first div but can't seem to isolate it. Here's my (stripped back, but correct) html:
<div id="page_container">
<div></div> // this div has content, but no id or class
<div class="holder"></div> // this div has content
<div class="section"></div> // <<<< this is the div I want to select; the first div with the class 'section'
<div class="section"></div> // I don't want to select other 'section's
<div class="section"></div>
<div class="section"></div>
</div>
CSS-wise, so far I have tried...
#page_container > div > .section:first-child {
...rules here
}
#page_container > div:first-child(.section) { // is this even valid?
...rules here
}
#page_container > div > div > .section:first-child {
...rules here
}
...without luck.
I may be experiencing a brain-fart, but how would I select just the first div with a class of 'section'?
Any help, much appreciated!