Kev*_*ans 1 css css-float internet-explorer-7

我需要一些帮助,试图在IE中正确显示浮动.我试图将它[箭头]向右浮动后IE想要添加换行符...
我想它显示像Firefox(右),它们都适合一行,但我似乎无法弄清楚如何...
干杯.
background-image: url( '/img/arrow_down.gif' );
background-repeat: no-repeat;
height: 8px;
width: 15px;
display: inline;
float: right;
Run Code Online (Sandbox Code Playgroud)
发布您的标记会有所帮助.导致此问题的常见原因是标记中文本后面出现的箭头.如果将箭头移动到文本之前,它应该在两者中都是正确的.喜欢:
<span class="arrow-image"></span>This is the the text.
Run Code Online (Sandbox Code Playgroud)
当我第一次开始使用网页布局时,这对我来说听起来很奇怪,但我很惊讶地发现它有效(现在我明白float了一点,对我来说有点意义).
不过,您可能可以通过这个更简单的标记来逃避:
<ul id="menu">
<li>Some text</li>
<li>Some text</li>
<li>Some text</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
和CSS:
#menu > li
{
background-image: url('/img/arrow_down.gif');
background-repeat: no-repeat;
background-position: right center;
padding-right:16px; /* Width of the image */
/* ... */
}
Run Code Online (Sandbox Code Playgroud)