html - 仅在 firefox 和 ie 中为 ul 的 li 获取不必要的元素符号

标签 html css

<分区>


想改进这个问题吗? 通过 editing this post 添加细节并澄清问题.

关闭 9 年前

我有一个 ul 和一些 li 属于它,一切都很好,但问题是首先 li 在 firefox 中获得了额外的元素符号,即在其他浏览器中它很好

html

<div id="listItems">
    <div class="colorBlock orange"></div>
    <span>4 pts (1)</span>
     <ul id="dlrsList">
          <li >Crosstown Auto Centre</li>
          <li >Grande Prairie Chrysler Jeep Dodge</li>
     </ul>
</div>

CSS

#dlrsList {
            width: 100%;
            text-align: justify;
            display: list-item;            
            li {             
                padding: 0px;
                position: relative;                
                bottom: 8px;                                
                max-width: 160px;
                font-size: 12px;
            }
        }

最佳答案

我认为您的代码工作正常,只是在这里检查过 http://jsfiddle.net/TGVKu/

相同的CSS

#dlrsList {
            width: 100%;
            text-align: justify;
            display: list-item;            
            li {             
                padding: 0px;
                position: relative;                
                bottom: 8px;                                
                max-width: 160px;
                font-size: 12px;
            }
        }

抱歉,我应该在评论中添加这个,但我没有足够的声誉来这样做。

关于html - 仅在 firefox 和 ie 中为 ul 的 li 获取不必要的元素符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18959498/

上一篇:html - CSS 浏览器宽度

下一篇:javascript - 为不正确的类触发的动画

相关文章:

html - 用css打印div html代码

html - 我的内容不会进入包装

html - 包含 iframe 的页面中的选项卡(键盘)导航

html - 应用负倾斜对内部 HTML 没有影响

javascript - 使用 jQuery 在悬停时预览图库中的相应图像

javascript - 根据对象属性在 ngRepeat 中创建 html 元素

javascript - 我想要一个细边框圆环图

css - 使用 :after only on certain divs

css - 仅在满足条件时更新 CSS 计数器

jquery - 鼠标悬停在表格行下方的按钮菜单