a:hover, li:hover {
color: red;
}
<ol>
<a href="#"><li>Main1</li></a>
<a href="#"><li>Main2</li>
<a href="#"><li>Main3
<ol>
<a href="#"><li>Sub1</li></a>
<a href="#"><li>Sub2</li></a>
<a href="#"><li>Sub3</li></a>
</ol>
</li></a>
<a href="#"><li>Main4</li></a>
<a href="#"><li>Main5</li></a>
<a href="#"><li>Main6</li></a>
</ol>
I have a nested order list. When I mouse hover on each item and text will become red. However, when I mouse over the sub item, the number of main will also become red.
(example, when I hover on sub1 the number "3" of main3 will also become red)
How to fix it? am I doing something wrong?