I'm trying to figure out how I can change the colour of font and background colour of the "Register" section when I hover with the mouse cursor over the other 3 options ('Login', 'About' and 'language'). I want it only to change the colours when one of the three other options are selected.
.main-menu {
width: 170px;
}
.floating-menu {
margin: 0 auto;
right: 26px;
position: fixed;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
height: 35%;
}
.floating-menu div a {
/**text-align: center;**/
text-decoration: none;
outline: none;
line-height: 2em;
display: block;
padding: 7px;
border-radius: auto;
position: relative;
top: 10px;
-webkit-transition: none;
-o-transition: none;
transition: none;
}
.main-menu a {
background-color: #fff;
color: #444950;
display: block;
padding: 12px;
text-decoration: none;
font-family: Arial, sans-serif;
font-size: 18;
font-weight: bold;
border-radius: 9px;
}
.main-menu a:hover {
background-color: #eee;
color: #00B200;
}
.main-menu a.active {
background-color: #eee;
color: #00B200;
}
.main-menu a.active:hover {
background-color: #00B200;
color: #fff;
}
<div class="main-menu">
<a href="#">Log In</a>
<a href="#" class="active">Register</a>
<a href="#">About</a>
<a href="#">Language</a>
</div>