我在我们公司的网站上工作,我对 HTML 和 CSS 非常陌生。我正在尝试为导航栏制作一个下拉菜单,并且我有它的要点,但它需要一些帮助。下拉列表没有正确排列,文本太大,我的边框跨越了列表的整个长度。
CSS:
.menu{
padding:0;
margin:25px 0 0 0;
}
.menu, .menu li{
list-style: none;
display: block;
float:right;
padding:12px;
border-right: 1px solid #d8d8d8;
}
.menu li{
float:left;
display: block;
width: 100px;
}
.menu ul{
opacity: 0;
}
.menu ul li{
background-color: white;
}
.menu li:hover > ul{
opacity: 1;
}
.menu li.last-menu-item{
border: none;
padding-right:0;
}
.menu a{
color:#132d3c;
font-size:15px;
font-family: 'sansationbold';
text-transform: uppercase;
text-decoration: none;
font-weight:lighter;
}
.current-menu-item a{
color:#f15c22;
}
.menu a:hover{
color:#f15c22;
}
HTML:
<ul class="menu alignright">
<li class="current-menu-item"><a href="index.html">Home</a></li>
<li><a href="about.html">About</a>
<ul>
<li><a href="about.html">Who We Ar</a></li>
<li><a href="about.html">Values</a></li>
<li><a href="about.html">Owners Message</a></li>
<li><a href="#">Infotek Blog</a></li>
<li><a href="stories.html">Success Stories</a></li>
<li><a href="partners.html">Partners</a></li>
</ul>
</li>
<li><a href="products.html">Products & Solutions</a>
<ul>
<li><a href="p&s.html">Security Solutions</a></li>
<li><a href="p&s.html">Data Solutions</a></li>
<li><a href="p&s.html">Communication Solutions</a></li>
<li><a href="p&s.html">Connectivity Solutions</a></li>
<li><a href="p&s.html">Infrastructure Solutions</a></li>
<li><a href="resources.html">Resources</a></li>
</ul>
</li>
<li class="last-menu-item"><a href="contact.html">Contact</a></li>
</ul>
我能得到一点帮助吗?