Lets say i have 2 elements on my website position at opposite ends 1 at the far right and other at the far left like
how do i make it so that when i hover over element 1 some property about element 2 changes say it's color. I have already tried a nested selector like-
#element1:hover{
#element2{
background-color:black;
}
}
but it didn't work. Is there a way to achieve this using only css and html if so how??