0

我对菜单栏单词之间的 CSS 空白有疑问。我尝试了很多方法,但仍然无法解决。有人可以在这里帮助我吗?

菜单问题的图片如下:http: //imageshack.us/photo/my-images/201/44262065.jpg/

我希望结果是这样的,每个菜单之间的空间更小:http: //i47.tinypic.com/2vvwcnn.jpg

这是我的CSS:

  #cssmenu{
     border:none;
     border:0px;
     margin:0px;
     padding:0px;
     font-family:verdana,geneva,arial,helvetica,sans-serif;
     font-size:14px;
     font-weight:bold;
     color:8e8e8e;
}
  #cssmenu ul{
     background:url(img/menu-bg.gif) top left repeat-x;

     height:43px;
     list-style:none;
     margin:0;
     padding:0;


}
#cssmenu li{
    float:left;
    padding:0px 0px 0px 132px;
    display: inline-block;
    }
#cssmenu li a{
    color:#666666;
    display:block;
    font-weight:bold;
    line-height:43px;
    padding:0px 0px;
    text-align:left;
    text-decoration:none;
    }
    #cssmenu li a:hover{
        color:#000000;
        text-decoration:none;
        }
#cssmenu li ul{
    background:#e0e0e0;
    border-left:2px solid #f68618;
    border-right:2px solid #f68618;
    border-bottom:2px solid #f68618;
    display:none;
    height:auto;
    filter:alpha(opacity=95);
    opacity:0.95;
    position:absolute;
    width:180px;
    z-index:200;
    /*top:1em;
    /*left:0;*/
    }
#cssmenu li:hover ul{
    display:block;
    }
#cssmenu li li {
    display:block;
    float:none;
    padding:0px;
    width:180px;
    }
#cssmenu li ul a{
    display:block;
    font-size:12px;
    font-style:normal;
    padding:0px 10px 0px 15px;
    text-align:left;
    }
    #cssmenu li ul a:hover{
        background:#949494;
        color:#000000;
        opacity:1.0;
        filter:alpha(opacity=100);
        }
#cssmenu p{
    clear:left;
    }   
#cssmenu .active > a:hover {
    color:#ffffff;
    }

这是我的html代码:

<div id='cssmenu'>

<ul>
   <li><a href='index.php'><span>Home</span></a></li>
   <li><a href='promotions.php'><span>Promotions</span></a></li>
   <li><a href='outlets.php'><span>Outlets</span></a></li>
   <li><a href='feedback.php'><span>Feedback</span></a></li>
   <li class='has-sub '><a href='#'><span>Career</span></a>
      <ul>
         <li><a href='stall.php'><span>Stall Leasing</span></a></li>
         <li><a href='career.php'><span>Career Opportunity</span></a></li>
      </ul>
   </li>
   <li><a href='contactUs.php'><span>Contact Us</span></a></li>
</ul>

                </div>
4

2 回答 2

0

尝试从蓝色 round.css 文件中的 .border 类第 311 行删除填充

于 2013-01-09T04:32:15.207 回答
0

使用它来减少你的 li 和 line-height 的填充

#cssmenu li{
    float:left;
    padding:30px;
    display: inline-block;
    }
于 2013-01-09T05:50:36.637 回答