I’m trying to create a tabbed navigation.
I can’t get my hover color to fill the entire area of my tabs (rounded top left/right). Right now the hover only covers the linking text within the tab and the hover doesn’t have rounded corners.
I want the hover to perfectly cover the area of the tabs – rounded corners and all.
HTML:
<div id="tabbed-widget-2" class="widget tabbed-widget">
<div class="widget-wrap">
<div class="tw-tabs ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul class="tw-tabbed-nav ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li id="tab-link-2-0" class="ui-state-default ui-corner-top">
<a href="#tw-content-2-0">Welcome</a>
</li>
<li id="tab-link-2-1" class="ui-state-default ui-corner-top">
<a href="#tw-content-2-1">Topics</a>
</li>
<li id="tab-link-2-2" class="ui-state-default ui-corner-top">
<a href="#tw-content-2-2">Archives</a>
</li>
<li id="tab-link-2-3" class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active">
<a href="#tw-content-2-3">Social</a>
</li>
</ul>
CSS
#tab-link-2-0, #tab-link-2-1, #tab-link-2-2, #tab-link-2-3 {
background: green;
padding: 2px 12px;
margin: 0 8px 0 0;
-moz-border-radius: 8px 8px 0 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
#tab-link-2-0 a:hover, #tab-link-2-1 a:hover, #tab-link-2-2 a:hover, #tab-link-2-3 a:hover {
background: none repeat scroll 0 0 #ffab35;
}
green background is for li tag and you styled :hover for a tag not li
and
<a>is an inline element adddisplay:blockto ithttp://tinkerbin.com/aqHTscEE