简体   繁体   English

Internet Explorer 8:列表问题

[英]Internet Explorer 8: list problem

There is an unordered list, and one of the list items contains two links. 有一个无序列表,并且列表项之一包含两个链接。 For some reason, Internet Explorer 8 is showing the part of the list item beginning with the first link as outside the list and apparently outside the containing div also. 由于某种原因,Internet Explorer 8将列表项的一部分从第一个链接开始显示为列表之外,并且显然也在包含div之外。 Here is what it looks like (those two lines should be on one line!): 这是它的样子(这两行应该在一行上!):

Illustration of list Problem http://img231.imageshack.us/img231/7726/listproblem.png 列表插图问题http://img231.imageshack.us/img231/7726/listproblem.png

The html: 的HTML:

<!-- These div make up the background image -->
<div class = "box">
<div class="boxBody">
    <ul>
        <li> </li>
        <li> <a href=""></a><a href=""></a></li>
    </ul>
</div>
</div>

The CSS: CSS:

li {
    list-style-type: square;
    margin-left:25px;
    font-size: 12px;
}

EDIT: On going step by step through the code, I found that for some reason having links inside the li is what is causing the problem. 编辑:在逐步执行代码的过程中,我发现出于某种原因,在li内具有链接是导致问题的原因。 Anyone know why this would be? 有人知道为什么会这样吗?

I don't think having links inside LI can cause any issues. 我认为在LI内建立链接不会引起任何问题。 By any chance are you using any reset CSS? 您是否有机会使用任何重置的CSS? (some CSS code to reset LI, UL etc..?) (一些CSS代码可以重置LI,UL等。?)

答案是...我忘了关闭上一个链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM