Shared brother means the element is behind another element, where the child selector targets the elements that are inside certain elements.
Siblings:
HTML:
<div class="brother"></div>
<div class="sister"></div>
CSS
.brother ~ .sister {
}
Children:
HTML
<div class="parent">
<div class="child">
<div class="child"></div>
</div>
</div>
CSS
.parent > .child{
}
source
share