CSS 如何隐藏侧边栏列表中的项目符号?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8481474/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I hide the bullets on my list for the sidebar?
提问by KBarnes
This is a WordPress site, the classes/ID's are generated, I can't just go in and add a class.
这是一个 WordPress 站点,生成了类/ID,我不能直接进入并添加一个类。
Yes, I have firebug... but I'm so twisted around and confused as to whether this is coming from BuddyPress or.... that I'm just asking for help on finding the id or class that I'd say list-style-type: none;
是的,我有萤火虫......但我很困惑,不知道这是来自 BuddyPress 还是......我只是寻求帮助来寻找我所说的列表的 id 或类-样式类型:无;
I need to have ULs with bullets working in the general contact area, but not in the sidebar or on the group categories. http://ratest4.com/art-categories/
我需要让 UL 与项目符号在一般接触区域工作,而不是在侧边栏或组类别中工作。 http://ratest4.com/art-categories/
Here is the code I want the bullet removed from (Gallery Hours h3):
这是我希望从(Gallery Hours h3)中删除项目符号的代码:
<div id="primary" class="widget-area" role="complementary">
<ul class="xoxo">
<li id="text-3" class="widget-container widget_text"><h3 class="widget-title">Gallery Hours</h3>
And here is CSS that came with the style sheet, that did work PRE Buddypress
这是样式表附带的 CSS,它确实可以工作 PRE Buddypress
.widget-area ul {
list-style: none;
margin-left: 0;}
So... why isn't that working?
那么......为什么这不起作用?
Also for the sidebar widget titles / h3s I have this but it too is not obeying:
同样对于侧边栏小部件标题/ h3s 我有这个,但它也不服从:
.widget-title {
background:#555555;
color: #fff;
font-weight: bold;
}
While these bullets in the sidebar were not there pre-BuddyPress install (in standard WordPress, they are now.
虽然侧栏中的这些项目符号在安装 BuddyPress 之前不存在(在标准 WordPress 中,它们现在是。
回答by animuson
You have a selector ul
on line 252
which is setting list-style: square outside none
(a square bullet). You'll have to change it to list-style: none
or just remove the line.
你有一个选择ul
对line 252
被设置list-style: square outside none
(方形子弹)。您必须将其更改为list-style: none
或仅删除该行。
If you only want to remove the bullets from that specific instance, you can use the specific selector for that list and its items as follows:
如果您只想从该特定实例中删除项目符号,您可以使用该列表及其项目的特定选择器,如下所示:
ul#groups-list.items-list { list-style: none }
回答by locrizak
its on you ul
in the file http://ratest4.com/wp-content/themes/HarnettArts-BP-2010/style.csson line 252
它在你ul
的文件http://ratest4.com/wp-content/themes/HarnettArts-BP-2010/style.csson line 252
add this to your css
将此添加到您的 css
ul{
list-style:none;
}