I was wondering if it is possible to style a div if a other div contains a specific class?! I know this can be done with jQuery but I was wondering if it can be done with CSS aswell.
Let's say I have
<div class="stickyWrap sticky"></div>
<div class="checkout "></div>
Is it possible to style checkout
when stickWrap
contains the class sticky
?
I tried something like:
.stickyWrap[class*="sticky"] + .checkout{
background-color: #1f6053;
}
That obvious doesn't work.