I need change button background color on hover input. Changing the color of the button when hovering over the button is not a problem, and when hovering over the input it does not work. What am I doing wrong?
.menu__search {
height: 60px;
padding: 0;
position: relative;
width: 100%;
}
.menu__search input {
transition: background 0.5s ease, color 0.3s linear !important;
}
.menu__search input:hover {
background-color: yellow !important;
color: black !important;
box-shadow: inset 0px 0px 3px rgba(0,0,0,0.5);
}
.menu__search input:hover::placeholder {
font-weight: 500;
color: green;
}
.menu__search input:hover button {
background: red;
}
.menu__search button:hover {
background: red;
}
<div class="menu__search">
<input id="input_search" type="text" name="search" placeholder="search" class="menu-input">
<button type="button" id="menu__search-button" class="menu-btn-search>
<i class="fa fa-search">Search</i>
</button>
</div>