Hello guys,
I have a simple problem.. how can I make the background image opacity that does not affect the child element.. below are my code on this..
CSS
.menu ul li.nav-home { background:url('img/icons/home.png') no-repeat center 6px; opacity:0.2; }
HTML
<div class="menu"> <ul> <li class="nav-home"><a href="#">Home</a></li> </ul> </div>
this is wp_nav_menu for WordPress.. I google this but still not working maybe you have an idea..
thanks
have you tried
.menu ul li.nav-home { background:url(‘img/icons/home.png’) no-repeat center 6px; opacity:0.2; }
+
.menu ul li.nav-home a{ opacity:1; }
creativestuff said
have you tried.menu ul li.nav-home { background:url(‘img/icons/home.png’) no-repeat center 6px; opacity:0.2; }
+
.menu ul li.nav-home a{ opacity:1; }
Yes.. that will not work..
Yeah, it won’t work as everything in the <ui> becomes opacity 0.2
use rgba eg, (255, 255, 255, 0.6) will be like opacity 0.6 on a white background.
This changes the color and not the actual transparency, this doesn’t work in IE7 but there is a fix online! 
This is not working also.. Seems I cannot solve this one.. here’s my new question.. How do I add extra span tag in my wp_nav_menu function?
<div class="menu"> <ul> <li class="nav-home"><span> </span><a href="#">Home</a></li> </ul> </div>
