IE5忽略内联元素的填充或边距 - 解决方法? [英] IE5 ignores padding or margin for inline elements - workaround?
问题描述
嗨
有人知道IE5不应用保证金
和填充内联元素的事实吗?我有这些样式的导航:
ul#navigation {
border-top:1px#000000 solid;
border -bottom:1px#000000 solid;
list-style:none;
margin:0;
padding:0.2em 0 0.2em 2em ;
white-space:nowrap;
}
ul#navigation li {
display:inline;
保证金:0;
填充:0 2em 0 0;
font-weight:bold;
颜色: #000000;
}
在标准浏览器和IE6中运行良好。这可以修复IE5
而不破坏其他浏览器,甚至使用弃用的HTML吗?
感谢您的提示。
-
Markus
Hi
Does somebody know a workaround for the fact that IE5 does not apply margin
and padding to inline elements? I have a navigation with those styles:
ul#navigation {
border-top:1px #000000 solid;
border-bottom:1px #000000 solid;
list-style:none;
margin:0;
padding:0.2em 0 0.2em 2em;
white-space:nowrap;
}
ul#navigation li {
display:inline;
margin:0;
padding:0 2em 0 0;
font-weight:bold;
color:#000000;
}
Works nicely in standards browsers and IE6. Can this get fixed for IE5
without breaking other browsers, or even using deprecated HTML?
Thanks for a hint.
--
Markus
推荐答案
Markus Ernst写道:
Markus Ernst wrote:
嗨
你好
有人知道IE5不对内联元素应用保证金
和填充的事实吗?
我只是在应用高度时取得了成功,但即使是1px
的高度也会导致比我通常想要的更高的高度。
我有这些样式的导航:
ul#navigation {
border-top:1px#000000 solid;
border-bottom:1px #000000 solid;
list-style:none;
margin:0;
padding:0.2em 0 0.2em 2em;
white-space:nowrap;
}
ul#navigation li {
显示:内联;
边距:0;
填充:0 2em 0 0;
font-weight:bold;
颜色:#000000;
}
在标准浏览器和IE6中运行良好。这可以解决IE5
而不破坏其他浏览器,甚至使用弃用的HTML?
如果我将高度应用于< li>,我会忘记元素,或内部的< a>
元素,真的,但诀窍在于高度:-)
感谢提示。
Hi
Hello
Does somebody know a workaround for the fact that IE5 does not apply margin
and padding to inline elements?
I''ve only had succes with applying a height to them, but even a 1px
height will result in a higher height than I usually want.
I have a navigation with those styles:
ul#navigation {
border-top:1px #000000 solid;
border-bottom:1px #000000 solid;
list-style:none;
margin:0;
padding:0.2em 0 0.2em 2em;
white-space:nowrap;
}
ul#navigation li {
display:inline;
margin:0;
padding:0 2em 0 0;
font-weight:bold;
color:#000000;
}
Works nicely in standards browsers and IE6. Can this get fixed for IE5
without breaking other browsers, or even using deprecated HTML?
I forgot if I apply the height to the <li> element, or to the <a>
element inside, really, but the trick is in the height :-)
Thanks for a hint.
欢迎你。
-
Els http://locusmeus.com/
Sonhos vem。 Sonhos v?o。 Orestoébritfeito。
- Renato Russo -
现在玩:Dirty White Boy - Badlands
You''re welcome.
--
Els http://locusmeus.com/
Sonhos vem. Sonhos v?o. O resto é imperfeito.
- Renato Russo -
Now playing: Dirty White Boy - Badlands
Els写道:
有人知道IE5不对内联元素应用边距和填充这一事实的解决方法吗?
Does somebody know a workaround for the fact that IE5 does not apply
margin and padding to inline elements?
<我只是在为它们施加高度方面取得了成功,但即使是1px
高度也会导致比我通常想要的更高的高度。
如果我申请,我忘了< li>的高度元素,或内部的< a>
元素,真的,但诀窍在于高度: - )
I''ve only had succes with applying a height to them, but even a 1px
height will result in a higher height than I usually want.
I forgot if I apply the height to the <li> element, or to the <a>
element inside, really, but the trick is in the height :-)
Ouf ... height is
IE5中计算出的其中一个维度,不是吗?我想在添加Tantek黑客和调整高度之前,我会宁愿用PHP嗅探IE5和
添加一些& nbsp; s然后...
非常感谢您的投入并享受星期六的工作;-)
-
Markus
Ouf... height is one of those dimensions that are differently computed in
IE5, isn''t it? I guess before adding Tantek hacks and adjusting heights for
different kinds of rendering engines... I will rather sniff IE5 with PHP and
add some s then...
Thanks a lot for your input and enjoy working on saturday ;-)
--
Markus
" Markus Ernst" < derernst@NO#SP#AMgmx.ch>写道:
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> wrote:
有人知道IE5不应用边距
和填充内联元素这一事实的解决方法吗?我有这些风格的导航:
Does somebody know a workaround for the fact that IE5 does not apply margin
and padding to inline elements? I have a navigation with those styles:
除非你有一个不寻常的高比例的IE5.0客户,我不会
担心它(IE5.5确实对内联元素应用填充)。
-
Spartanicus
Unless you have an unusual high percentage of IE5.0 clients, I wouldn''t
worry about it (IE5.5 does apply padding to inline elements).
--
Spartanicus
这篇关于IE5忽略内联元素的填充或边距 - 解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!