/* Target the first div which has a sibling from the first row within .container-fluid */ .container-fluid > .row:first-of-type > div:not(:only-child) { z-index: 1; }