I'm trying to apply a CSS style to multiple div elements as in the following HTML code:
{% for i in player_range %}
<div id="container-frame-{{ i }}"
...
</div>
{% endfor %}
Where the value of i is variable and being passed to the HTML from the Python side of my software.
Below is the CSS style I'd like to apply for each element.
#container-frame-0{
border-style: solid;
border-width: 5px;
border-color: green;
}
I tried to hardcode the different values of i (e.g, 0,1,2 etc...) to the container-frame style and it works fine. However, I'm searching for a cleaner way to do it.
Ideally I'm looking for something like this:
#container-frame-{{i}}{
border-style: solid;
border-width: 5px;
border-color: green;
}
Where i is the same as in the HTML. Any idea how to do so?