Reputation: 189
I've some a hrefs in a menu
<ul id="nav">
<li>
<a href="#">Project</a>
<div class="subs">
<div>
<ul>
<li>
<h3>Save</h3>
<ul>
<li>
<a id="save_canvas" href="#" class='disabled'>Save to File</a>
</li>
<li>
<a id="save_canvas_as" href="#">Save as</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</li>
The css for the hover effect is like this:
#nav li ul ul li a:hover {
background-color: #0060a6;
color: #fff;
}
How can I disable the hover effect for one of the menu (list) items, e.g the for "Save to File"? I tried to put it in a 'disabled' class with:
disabled {
filter: alpha(opacity=30);
-moz-opacity:0.3;
opacity: 0.3;
}
.disabled a:hover{
background-color: none !important;
}
But it doesn't work..... THX!
Upvotes: 0
Views: 1024
Reputation: 9041
If you're concerned with browser compatibility
#nav li ul ul li a.disabled:hover {
background-color: *your default color*;
color: *your default color*;
}
Upvotes: 2
Reputation: 801
Give your current save anchor css with !important
or
nav li ul ul li a:not(#save_canvas):hover {
background-color: #0060a6;
color: #fff;
}
Upvotes: 1