I want to use one class like .outer
for both divs, but with different style for the parent element if there are more then two childs.
Please see the attached example.
.outer1{
border: solid 6px #f00;
}
.outer2{
border: solid 6px #ccc;
}
<p>More than two childs:</p>
<div class="outer1">
<div class="div1">div1</div>
<div class="div2">div2</div>
<div class="div3">div3</div>
</div>
<p>Just two childs:</p>
<div class="outer2">
<div class="div1">div1</div>
<div class="div2">div2</div>
</div>