In the following snippet, I only want the first div
after the legend which has the text one
and nothing else but is selecting three
also
.container fieldset div:first-of-type {
border: 1px solid red;
}
<html>
<body>
<div class="container">
<fieldset>
<legen>blah</legen>
<div>one</div>
<div>two
<div>three</div>
</div>
<div>three</div>
</fieldset>
</div>
</body>
</html>