I have code similar to the following:
.banner.customer-service {
height: calc(70vh - 85px - 8em);
background:url(//careers.jobvite.com/marinecreditunion/images/customerservice.jpg) center center / cover no-repeat;
}
.banner.customer-service span {
background:rgba(0,0,0,0.5);
}
.banner.early-talent {
height: calc(70vh - 85px - 8em);
background:url(//careers.jobvite.com/marinecreditunion/images/earlytalent.jpg) center center / cover no-repeat;
}
.banner.early-talent span {
background:rgba(0,0,0,0.5);
}
<div class="banner"><p>Header</p></div>
<div class="banner customer-service"><p>Specific Header</p></div>
<div class="banner early-talent"><p>Other Specific Header</p></div>
I have 12 classes similar to the .banner.specific-class
. What I'm hoping to do is something like this:
.banner.* > p {} /* stuff to apply to the p tag */
I DON'T want the style applied to elements with just .banner
; I only want to apply the styles to elements with .banner
and a second class.
My goal is to apply styling ONLY to elements that have .banner.other-class p
and not the base .banner p
.
Is there a way to do this without writing individual CSS styles for each of the 12 classes?