css - vertical gap on menu without using jquery -


i wondering how, in example, possible have gap between menu item , list.

this css code demo

#colornav > ul{     width: 450px; /* increase when adding more menu items */     margin:0 auto; }  #colornav > ul > li{ /* style top level li */     list-style: none;     box-shadow: 0 0 10px rgba(100, 100, 100, 0.2) inset,1px 1px 1px #ccc;     display: inline-block;     line-height: 1;     margin: 1px;     border-radius: 3px;     position:relative; }  #colornav > ul > li > a{     color:inherit;     text-decoration:none !important;     font-size:24px;     padding: 25px; }  #colornav li ul{     position:absolute;     list-style:none;     text-align:center;     width:180px;     left:50%;     margin-left:-90px;     top:70px;     font:bold 12px 'open sans condensed', sans-serif;      /* important show/hide css animation */     max-height:0px;     overflow:hidden;      -webkit-transition:max-height 0.4s linear;     -moz-transition:max-height 0.4s linear;     transition:max-height 0.4s linear; }  #colornav li ul li{     background-color:#313131; }  #colornav li ul li a{     padding:12px;     color:#fff !important;     text-decoration:none !important;     display:block; }  #colornav li ul li:nth-child(odd){ /* zebra stripes */     background-color:#363636; }  #colornav li ul li:hover{     background-color:#444; }  #colornav li ul li:first-child{     border-radius:3px 3px 0 0;     margin-top:25px;     position:relative; }  #colornav li ul li:first-child:before{ /* pointer tip */     content:'';     position:absolute;     width:1px;     height:1px;     border:5px solid transparent;     border-bottom-color:#313131;     left:50%;     top:-10px;     margin-left:-5px; }  #colornav li ul li:last-child{     border-bottom-left-radius:3px;     border-bottom-right-radius:3px; }  /* trigger css */ /* transition animation on hover */  #colornav li:hover ul{     max-height:200px; /* increase when adding more dropdown items */ } 

here link: http://demo.tutorialzine.com/2012/10/css3-dropdown-menu/

#colornav li ul li:first-child {     margin-top: 25px; } 

is creating gap.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -