UL列表样式不适用 [英] UL list style not applying

查看:80
本文介绍了UL列表样式不适用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个样式表,不管什么原因,不会将列表样式类型应用于UL元素。我使用YUI的Grid CSS和他们的reset-fonts-grid.css文件,我知道它们作为CSS重置的一部分。



调用YUI后,我调用网站的样式表,并在UL中有一个块:

  ul {list-style-type:disc; } 

我也试过通过列表风格进行设置,但得到相同的结果。我知道上面的CSS块正在读取,如果我添加的东西,如填充或边距,那些应用。



我已经应用于UL的其他CSS只有#nav div,但是CSS doesn触摸列表样式类型,它使用YUI提供的重置,并且YUI和网站样式表是被调用的唯一两个CSS表。



我也有在网站的管理端的FCKEditor,该编辑器显示项目符号样式,所以我知道它必须是与FCKEditor没有过滤的CSS。



如果我没有错误,你应该将此规则应用于li,而不是ul。 pre> ul li {list-style-type:disc;}


I've got a stylesheet that will not, for whatever reason, apply list-style-type to a UL element. I'm using YUI's Grid CSS with their reset-fonts-grid.css file, which I know strips that out as part of the CSS reset.

After calling YUI, I call the stylesheet for the website and in there have a block for UL:

ul {list-style-type: disc;}

I've also tried setting it via list-style but get the same result. I know that the above CSS block is getting read as if I add things like padding or margins those do get applied. The style-type isn't showing up in either Firefox or IE.

The only other CSS I've applied to UL's are in a #nav div but that CSS doesn't touch the list-style-type, it uses the reset that YUI provided, and YUI and the site style sheet are the only two CSS sheets that are called.

I've also got FCKEditor on the admin side of the site and that editor does show the bullet styles so I know it has to be something with the CSS that isn't being filtered by FCKEditor.

解决方案

If I'm not mistaken, you should be applying this rule to the li, not the ul.

ul li {list-style-type: disc;}

这篇关于UL列表样式不适用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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