I have few dives that are identical but they have different div IDs. Is there any way to apply a CSS style to all the div IDs using some sort of a selector, that is cross browser compatible? My HTML looks like this
<div id="field_0_dd"></div>
<div id="field_1_dd"></div>
<div id="field_2_dd"></div>
<div id="field_3_dd"></div>
<div id="field_4_dd"></div>
<div id="field_5_dd"></div>
Thanks heaps 🙂
You can use attribute selectors (
^=is the starts with selector and$=is the ends with selector):Although having this many unique IDs is pretty hard to manage. Give them a class as well.