I need help implementing a color switch on hover, but I'm facing an issue where the text (within a span) is within a list item. Currently, the color changes only when hovering over the text itself, but I want it to change when hovering over the entire list item element.
span {
color: orange;
transition: all 0.5s ease-in-out;
font-weight: 200;
}
ul {
text-align: center;
padding-top: 20px;
}
li {
list-style: none;
display: inline-flex;
padding: 10px 10px;
font-size: 30px;
transition: all 0.5s ease-in-out;
border: 1px solid black;
font-weight: 300;
border-right: 1px;
border-left: 1px;
}
#ot {
border-top: 1px solid orange;
border-bottom: 1px;
border-left: 1px solid orange;
}
#ob {
border-bottom: 1px solid black;
border-top: 1px;
border-right: 1px solid black;
color:
}
#black:hover {
color: black;
}
#ot:hover {
border-top: 1px solid black;
border-left: 1px solid black;
color: orange;
}
#ob:hover {
border-bottom: 1px solid orange;
border-right: 1px solid orange;
color: orange;
}
<ul>
<li id="ot">high <span id="black">Park</span></li>
<li id="ob">the <span id="black">Beach</span></li>
</ul>