Issue
How can I make my anchor match the exact size of the parent list item? Currently it displays the size of the element itself.
Css:
ul li a{color: black;background:url(http://mwv3.webs.com/menu_hover.png)-20px bottom no-repeat;
padding:0px 0px 9px 0px;width:100%;
-webkit-transition: background .5s ease;
-moz-transition: background .5s ease;
-o-transition: background .5s ease;
-ms-transition: background .5s ease;
transition: background .5s ease;
}
ul li a:hover{
background:url(http://mwv3.webs.com/menu_hover.png) center bottom
}
Html
<div id="wrapper">
<div class="nav">
<ul>
<li><a href="#">One</a></li>
<li><a href="#">One</a></li>
<li><a href="#">One</a></li>
<li><a href="#">One</a></li>
<li><a href="#">One</a></li>
</ul>
</div>
</div>
Thanks
Solution
Just Use This css it will work fine on jsfiddle
ul li a{color: black;background:url(http://mwv3.webs.com/menu_hover.png)-20px bottom no-repeat;
padding:0px 0px 9px 0px;width:100%;
-webkit-transition: background .5s ease;
-moz-transition: background .5s ease;
-o-transition: background .5s ease;
-ms-transition: background .5s ease;
transition: background .5s ease;
display:block;/*ADDED*/
}
ul li a:hover{
background:url(http://mwv3.webs.com/menu_hover.png) center bottom no-repeat; /*Changed*/
}
Answered By - Love Trivedi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.