css - Nav Pills Background Leak -
i looking use navigation pills on website, resulting in background leak. see effect on website: http://oleb.net/blog/2011/12/tutorial-how-to-sort-and-group-uitableview-by-date/. hover on pills multiple times see issue. can see outline of pills appear.
here code tried:
.navigation-main { border-top: 1px solid rgba(0,0,0,0.1); padding-top: 5px; clear: both; display: block; font: 700 13px/1.3076923076 lato, sans-serif; letter-spacing: .05em; text-transform: uppercase; width: 100%; } .navigation-main .menu { max-width: 1272px; margin: 0 auto; } .navigation-main ul { list-style: none; margin: 0; padding-left: 0; text-align: center; } .navigation-main li { display: inline-block; position: relative; width: 100px; } .navigation-main li:after { content: none; display: block; font-size: 11px; margin-top: -4px; vertical-align: middle; } .navigation-main li:last-child:after { content: none; } .navigation-main { display: block; line-height: 2.6153846153; padding: 0 10px; text-decoration: none; white-space: nowrap; } .navigation-main ul ul { background-color: #000; display: none; float: left; position: absolute; top: 2.6153846153em; left: 0; text-align: left; z-index: 99999; } .navigation-main li li { display: block; } .navigation-main li li:after { content: ""; display: block; margin: 0; } .navigation-main ul ul ul { left: 100%; top: 0; } .navigation-main ul ul { color: #fff; line-height: 1.3076923076; padding: .6153846153em 10px .6923076923em; white-space: normal; width: 170px; } .navigation-main ul ul a:hover { background-color: #333; color: #fff; } .navigation-main ul li:hover > ul { display: block; } /* pill happens */ .navigation-main a:hover, .navigation-main li.current_page_item > a, .navigation-main li.current-menu-item > { border-radius: 4px; color: #ffffff; background-color: #000; }
how stop outline appearing? thanks!
edit: code tried:
.navigation-main li { display: inline-block; position: relative; border-radius: 6px; width: 100px; .navigation-main a:hover, .navigation-main li.current_page_item > a, .navigation-main li.current-menu-item > { border-radius: 4px; color: #ffffff; background-color: #000; background-clip: padding-box; }
try adding css:
background-clip: padding-box;
add item using border-radius.
here need write change example. tried , verified.
body > header nav li a:hover { color: white; background-color: #0a6abf; background-clip: padding-box; }
with background-clip
without background-clip
Comments
Post a Comment