1
I made a menu with 'Hover' effect but I want to change the color of the gray bar of the menu by touching the cursor on the "Search and News" buttons but I do not know how to specify the address . navbar (responsible for the gray color of the menu bar) applying the 'Hover' effect on it, because it is main above the other Divs, there is some way to make the gray bar change color by touching the cursor on the 'search' and 'News' items' ??
body{background-color:#09C;}
.navbar{ overflow:hidden;
background-color:#666;
font-family:Arial, Helvetica, sans-serif;
}
.navbar a{float: left;
font-size: 16px;
color: #FFF;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.navbar a:hover, .menu:hover .bt{background-color: #0C0;
}
.menu{float: left;
overflow: hidden;
}
.menu .bt{font-size: 16px;
border: none;
outline: none;
color: #FFF;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin:0;
}
.menu:hover .sub{ display:block;
}
.sub{display: none;
position: absolute;
background-color:#f9f9f9;
min-width: 160px;
}
.sub a{float: none;
color: #000;
padding: 14px 16px;
text-decoration: none;
display: block;
text-align: left;
}
<div class="navbar">
<a href="#">Pesquisas</a>
<div class="menu">
<button class="bt">News</button>
<div class="sub">
<a href="#">Links</a>
<a href="#">Links</a>
<a href="#">Links</a>
</div>
</div>
</div>