JSFiddle - React, Tailwind, and code Playground
by Dineshkani
HTML
<div>
<h3>This is first div</h3>
<span>First span</span><br/>
<span>second span</span><br/>
</div>
<div>
<h3>This is second div</h3>
<span>First span</span><br/>
<span>second span</span><br/>
</div>
<div>
<h3>This is third div</h3>
<div>First span</div><br/>
<div>second span</div><br/>
</div>
In here it selects div which is 2nd child for the element.
CSS
div:nth-last-child(1){
color: red;
}