So I am trying to make a menu with divs so I can use the :hover and have an image showing when you hover over each button, and my html for each of the links are:
<div class="home homeTwo">
<img src="images/homebanner.jpg" width="120" alt="homebanner">
<div class="homeMask"><a href="home.html" class="to2Page">Home</a>
</div>
</div>
Then my Css does the rest of the work, so :
.home{
width: 120px;
float: left;
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
}
.home .homeMask{
width: 120px;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
}
.home img{
display: block;
position: relative;
}
.home a.to2Page{
display: inline-block;
text-decoration: none;
color: #FFF;
font-family:Verdana, Geneva, sans-serif;
}
.homeTwo img{
transform: scaleY(1);
transition: all 0.7s ease-in-out;
}
.homeTwo .homeMask{
transition: all 0.5s linear;
opacity: 0;
filter:alpha(opacity=0);
}
.homeTwo a.to2Page{
opacity:0;
filter:alpha(opacity=0);
transform: scale(0);
transition: all 0.5s linear;
}
.homeTwo:hover img{
transform: scale(10);
opacity: 0;
filter:alpha(opacity=0);
}
.home:hover .homeTwo:hover{
opacity: 1;
filter:alpha(opacity=100);
}
.homeTwo:hover a.to2Page{
transform: scale(1);
opacity: 1;
filter:alpha(opacity=100);
}
I have 7 extra classes that do the same thing, however only the last one works. Am I doing something wrong?