I\'m trying to make a div\'s background color change on mouse over.
the div {background:white;}
the div a:hover{background:grey
Just make the property !important
in your css file so that background color doesnot change on mouse over.This worked for me.
Example:
.fbColor {
background-color: #3b5998 !important;
color: white;
}
There is no need to put anchor. To change style of div on hover then Change background color of div on hover.
<div class="div_hover"> Change div background color on hover</div>
In .css page
.div_hover { background-color: #FFFFFF; }
.div_hover:hover { background-color: #000000; }
Set
display: block;
on a and give some height
You can just put the anchor around the div.
<a class="big-link"><div>this is a div</div></a>
and then
a.big-link {
background-color: 888;
}
a.big-link:hover {
background-color: f88;
}