Answers for "change color of another div on hover"

CSS
1

how to change color of element when hovering over div

/*
to change the color of an element inside a div, 
specify what element you want to change 
when hovering over the div like this:
*/
.div:hover .element{ 
	color: red;
}
Posted by: Guest on December-02-2021
-1

on class hover another class color change

/* For wrapper is a child of item */
.item:hover .wrapper {
    color: #fff;
    background-color: #000;
}

/* For wrapper is another div and item is another */
.item:hover ~ .wrapper {
    color: #fff;
    background-color: #000;
}
Posted by: Guest on December-04-2020

Code answers related to "change color of another div on hover"

Browse Popular Code Answers by Language