In the example code, notice the .current
class has a grey gap at the bottom. My intent is to make that white all the way to the bottom, but any attempt to increase the size of the li just also expands the ul.
Overflow hidden is a problem for me because I still want the offset on the top of the li.
How can I give the effect of the .current
li background color of white extending to the bottom of the ul element?
http://codepen.io/anon/pen/rVrvZv
.site-nav {
display: block;
}
.site-nav ul {
background: linear-gradient(0deg, #d0d0d0, #fefefe);
border-top: #bdbdbd solid 1px;
border-bottom: #bdbdbd solid 1px;
}
.site-nav ul li {
display: inline-block;
width: 16.366666%;
height: 2.5rem;
text-align: center;
line-height: 2.5rem;
background: linear-gradient(0deg, #d0d0d0, #fefefe);
}
.site-nav ul li:hover {
background: linear-gradient(0deg, #babcbf, #e1e3e6);
}
.site-nav ul li.current {
position: relative;
background: #fff;
width: 16%;
border-top: #bdbdbd solid 1px;
border-left: #bdbdbd solid 1px;
border-right: #bdbdbd solid 1px;
top: -5px;
}
.site-nav a {
font-family: Helvetica, sans-serif;
color: #616264;
text-transform: uppercase;
letter-spacing: .08rem;
text-shadow: rgb(224, 224, 224) 1px 1px 0px;
filter: progid:DXImageTransform.Microsoft.Shadow(OffX=1, OffY=1, color=#e0e0e0);
font-size: .75rem;
}
<div class="site-nav">
<ul>
<li><a href="#">one</a></li>
<li><a href="#">two</a></li>
<li><a href="#">three</a></li>
<li class="current"><a href="#">four</a></li>
<li><a href="#">five</a></li>
<li><a href="#">six</a></li>
</ul>
</div>