I have this markup where the ids are not known in advance:
#product-20625055 { background-color: #FC0; }
#product-66980342 { background-color: #0CF; }
#product-54722210 { background-color: #F0C; }
<div class="product" id="product-20625055">Product 1</div>
<div class="product" id="product-66980342">Product 2</div>
<div class="product" id="product-54722210">Product 3</div>
I need to change the background color of all divs. This is the most specific selector I could think of but it does not work:
div.product[id^="product-"] { background-color: transparent; }
Could this be done without hard-coding ids, using !important
and changing HTML markup?