CSS-IE问题中的填充? [英] CSS - Padding in IE issue?

查看:110
本文介绍了CSS-IE问题中的填充?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在宽度方面有些麻烦.在Chrome/Firefox中,它看起来与Internet Explorer中的有所不同.在Internet Explorer中,它更大.是

I'm having trouble width some padding. In Chrome/Firefox it looks different than in Internet Explorer. In Internet Explorer it is much bigger. It is the

.menu ul li{
    display:inline;
    padding-right:60px;
    margin:0;
} 

为什么?

.menu{
    background-color:#000;
    height:35px;
    padding-top:15px;
    color:#fff;
    font-size:18px;
}

.menu ul{
    padding:0; 
    margin:0;
    list-style-type:none;
}

.menu ul li{
    display:inline;
    padding-right:60px;
    margin:0;
}

.menu a:link{
    color:#fff;
}

.menu a:active{
    color:#fff;
}

.menu a:hover{
    color:#fff;
}

.menu a:visited{
    color:#fff;
}

我真的希望有人能提供帮助:)

I really hope someone can help :)

推荐答案

IE将填充计算为高度/宽度的一部分,其他浏览器将其解释为高度/宽度加填充的部分.因此,请尝试仅提供高度/宽度或填充/边距.

IE calculates padding as part of height/width, other browsers interpret it height/width plus padding. So try to give only height/width or padding/margin.

这篇关于CSS-IE问题中的填充?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆