css - Separator between vertical menu items -
i'm making vertical menu website. it's supposed have mobile , feel. menu complete, don't know how add subtle divot/separator between each menu item. can show me how done?
i'm styling menu off of jpanelmenu, take if like.
here css menu:
#menu { position: absolute; top: 0; left: 100%; font-family: ubuntu; font-size: 16px; color: #ffffff; height: 100%; width: 15%; background: #1b1b1b; display: none; box-shadow: -0px 0px 6px #888888; z-index: 2; } #menu { color: white; text-decoration: none; } #menu li { list-style: none; padding-left: 5px; line-height: 50px; } #menulinks li:hover{ background: #6b6b6b; }
you can @ site if need visual demonstration. http://ion.comli.com
html
<ul class="menu"> <li><a href="#">overview</a></li> <li><a href="#">usase</a></li> <li><a href="#">inner-workings</a></li> <li><a href="#">animation</a></li> <li><a href="#">options</a></li> </ul>
css
.menu { padding: 0; list-style: none; max-width: 10em; overflow: hidden; background-color: gray; } .menu li { display: block; width: 100%; float: left; border-bottom: 1px solid rgba(0,0,0,.6); border-top: 1px solid rgba(255,255,255,.2); } .menu li { display: block; width: 100%; float: left; font-family: arial; font-size: 1em; color: white; font-weight: bold; padding: .6em 1em; text-decoration: none; background-color: gray; } .menu li:first-of-type { border-top: none; } .menu li:last-of-type { border-bottom: none; } .menu li { /* such ugly code */ background: #7f7f7f; background: -moz-linear-gradient(top, #7f7f7f 0%, #474747 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7f7f7f), color-stop(100%,#474747)); background: -webkit-linear-gradient(top, #7f7f7f 0%,#474747 100%); background: -o-linear-gradient(top, #7f7f7f 0%,#474747 100%); background: -ms-linear-gradient(top, #7f7f7f 0%,#474747 100%); background: linear-gradient(to bottom, #7f7f7f 0%,#474747 100%); filter: progid:dximagetransform.microsoft.gradient( startcolorstr='#7f7f7f', endcolorstr='#474747',gradienttype=0 ); }
Comments
Post a Comment