IE 中的垂直菜单填充问题
我用 css 创建了菜单,但在 IE 中显示有问题。
Internet Explorer:
(来源:picofile.com)
火狐:
(来源:picofile.com)
CSS:
<style>
.invertedshiftdown{
padding: 0;
width: 100%;
border-top: 5px solid #D10000;
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
}
.invertedshiftdown ul{
float:right;
margin:0;
padding: 0;
list-style: none;
}
.invertedshiftdown li{
display: inline;
margin: 0 2px 0 0;
padding: 0;
text-transform:uppercase;
}
.invertedshiftdown a{
float: left;
display: block;font-size:11px;
color: black;
text-decoration: none;
margin: 0 1px 0 0;
padding: 5px 10px 9px 10px;
background-color: white;
}
.invertedshiftdown a:hover{
background-color: #D10000;
padding-top: 9px;
padding-bottom: 5px;
color: white;
}
.invertedshiftdown .current a{
background-color: #FF7400;
padding-top: 9px;
padding-bottom: 5px;
color: white;
}
</style>
HTML:
<div style="width:600px;height:30px;float:right;">
<div class="invertedshiftdown">
<ul>
<li ><a href="http://www.dynamicdrive.com" title="Home">Home</a></li>
<li><a href="http://www.dynamicdrive.com/new.htm" title="New">New</a></li>
<li ><a href="http://www.dynamicdrive.com/revised.htm" title="Revised">Revised</a></li>
<li><a href="http://tools.dynamicdrive.com" title="Tools">Tools</a></li>
<li><a href="http://www.dynamicdrive.com/style/" title="CSS">CSS</a></li>
<li ><a href="http://www.dynamicdrive.com/forums/" title="DHTML Forums">Forums</a></li>
l>
</div>
</div>
我该如何解决这个问题?
I created the menu with css but in IE it shows with a problem.
Internet Explorer:
(source: picofile.com)
Firefox:
(source: picofile.com)
CSS:
<style>
.invertedshiftdown{
padding: 0;
width: 100%;
border-top: 5px solid #D10000;
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
}
.invertedshiftdown ul{
float:right;
margin:0;
padding: 0;
list-style: none;
}
.invertedshiftdown li{
display: inline;
margin: 0 2px 0 0;
padding: 0;
text-transform:uppercase;
}
.invertedshiftdown a{
float: left;
display: block;font-size:11px;
color: black;
text-decoration: none;
margin: 0 1px 0 0;
padding: 5px 10px 9px 10px;
background-color: white;
}
.invertedshiftdown a:hover{
background-color: #D10000;
padding-top: 9px;
padding-bottom: 5px;
color: white;
}
.invertedshiftdown .current a{
background-color: #FF7400;
padding-top: 9px;
padding-bottom: 5px;
color: white;
}
</style>
HTML:
<div style="width:600px;height:30px;float:right;">
<div class="invertedshiftdown">
<ul>
<li ><a href="http://www.dynamicdrive.com" title="Home">Home</a></li>
<li><a href="http://www.dynamicdrive.com/new.htm" title="New">New</a></li>
<li ><a href="http://www.dynamicdrive.com/revised.htm" title="Revised">Revised</a></li>
<li><a href="http://tools.dynamicdrive.com" title="Tools">Tools</a></li>
<li><a href="http://www.dynamicdrive.com/style/" title="CSS">CSS</a></li>
<li ><a href="http://www.dynamicdrive.com/forums/" title="DHTML Forums">Forums</a></li>
l>
</div>
</div>
How can I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 css
line-height
而不是padding
它应该可以解决您的问题。Use css
line-height
instead ofpadding
and it should solve your problems.