Looking to create a CSS menu that changes images and background when hovered over. Below is the code for my menu:
HTML
<ul>
<li class="active1"> <a href="profile.html" class="act">My Profile</a></li>
<li><a href="sponsor.html" class="profile1">My Sponsor</a></li>
<li><a href="bankdetails.html" class="profile2">My Payment Information </a></li>
<li><a href="mydocuments.html" class="profile3">My Documents (KYC) </a></li>
</ul>
CSS
.tabs ul li a {
color:#5d5c5c;
list-style:none;
text-decoration:none;
font-size:15px;
line-height:25px;
}
.tabs ul li {
list-style:none;
webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border:1px solid #c3c3c3;
float:left;
background:#e2e3e4;
padding:4px 16px;
}
.active1 {
background:url('../images/profile.jpg') no-repeat left center #004b85 !important;
color:#fff !important;
padding-left:35px !important;
height:40px;
border:none!important;
}
.act {
color:#fff!important;
}
.profile1 {
background: url('../images/profile.png') no-repeat -2px 0;
width: 23px;
height: 15px;
padding-left:25px;
}
.profile2 {
background: url('../images/profile.png') no-repeat -4px -29px;
width: 23px;
height: 18px;
padding-left:25px;
}
.profile3 {
background: url('../images/profile.png') no-repeat -6px -61px;
width: 20px;
height: 20px;
padding-left:25px;
}
Seeking assistance in making the CSS more dynamic using CSS nth-child items or jQuery. Any guidance is appreciated!