I need to style this div:
<div id="standings-@pool.PoolId"></div>
How do I select all of those divs with a different id
at once ?
I need to style this div:
<div id="standings-@pool.PoolId"></div>
How do I select all of those divs with a different id
at once ?
If in your id standings
substring is fixed, you can use css selectors for this like
div[id^="standings"]
It wii selects all elements with a id attribute containing the word "standings"
Stack Snippet
div {
width: 200px;
height: 50px;
margin-bottom: 10px;
font: 13px Verdana;
line-height: 50px;
text-align: center;
}
div[id^="standings"] {
border: 1px solid #000000;
}
<div id="standings-@pool.1">1</div>
<div id="standings-@pool.2">2</div>
<div>3</div>
<div id="standings-@pool.4">4</div>
<div id="standings-@pool.5">5</div>
<div id="standings-@pool.6">6</div>