html - how to get rid of the a "invisible border" on hover -


i'm trying make navigation bar right border, when this, there's invisible left border on hover, not make border color want be. (a part of left side blue instead of light blue)

this css

 #navbar{      width:900px;     margin:0 auto;     background-color:#3f67c0;     height:60px;       } #navbar ul {       list-style-type: none;      text-align: left;      margin:0px;     padding:0px;      }   #navbar ul li {       display: inline-block;      }   #navbar ul li {      display:block;     border-right:#fff solid 1px;     border-left:none;     border-top:none;     boder-bottom:none;     padding: 20px 40px 20px 40px;     text-decoration: none;     color: #fff;       }   #navbar ul li a:hover {       color: #fff;      background-color: #35b5eb;      }  

this html

<div id="navbar"> <ul> <li><a href="#">home</a></li> <li><a href="#">claim</a></li> <li><a href="#">proof</a></li> <li><a href="#">help</a></li> </ul> </div> 

this caused space in html combination of display: inline-block , display: block child. best solution remove said space

<li><a href="#">home</a></li ><li><a href="#">claim</a></li>... 

you use font-size: 0 on ul , necessary font-size on <li> or <a>, or use float: left on <li> instead of display: inline-block, these may result in other artifacts

http://jsfiddle.net/explosionpills/zpjcs/


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -