I really want to know if it is possible to change the property of all the other elements of the list when it wraps one element at it.
Say that when I find "element 2", I want the rest: the property "element 1", "element 3" and "element 4" css color changed to "red", but not on a pair.
Is this possible with css? is there a css selector for this actual function?
<ul id="list">
<li class="element">element 1</li>
<li class="element">element 2</li>
<li class="element">element 3</li>
<li class="element">element 4</li>
<ul>
Run codeHide result
source
share