Post/Page Lists vs. Sidebar Lists
-
Drop everything, I need your help! I’ve pretty much gotten a theme called Borderline Chaos to do what I want it to do, but there’s an issue with lists. In the sidebar, I do not want bullets of any kind, which is the default. But in my posts and pages (aka “the content”), I want lists to have a bullet. After working with the CSS file, I’ve managed to find that I can add a class for posts to achieve this, but that means I have to do that for every post. I’d rather be able to set a class for the sidebar
<li></li>tags, but I don’t seem to be able to do that. Setting a class for post lists means it may affect all my themes, so I guess I’d have to go back and add the CSS settings for the list class in all my themes’ CSS files, correct? I mean, in checking, my other themes seem to ignore the class and just put the bullets as normal, except for the WordPress Default theme. It renders the list indented and doesn’t look as nice.You can see an example: http://www.sassydevil.com/submissions/guidelines/. I’ll leave the page as is, with only the first two list items in the page using the class element, while the others are just marked with the usual
<LI></LI>tags, so you can see the difference. The default theme is Borderline Chaos, but I’d like you to take a look also at the WordPress Default for that same page. The other two themes aren’t causing problems (for now). Since some items in the sidebar use Template Tags that automatically put<LI></LI>tags in the results, I don’t know how I can set a list class for the sidebar only (which would enable me to use regular<LI></LI>tags in my posts, without classes). I hope I’m being clear on what I want, because I know I have trouble explaining sometimes, or tend to over-explain. Thank you.
-
Okay, calm down.
You can edit your
sidebar.phptemplate file to do whatever you want. I think the whole issue you are having is in the sidebar. So put the class references like<ul class="whatever">in the appropriate places in the sidebar and you can control whatever you want the bullets to look like in each section.These explain how to do all this:
Thanks, Lorelle! I had tried setting a class previously with the
<ul></ul>tag, but it didn’t work. I waited for answers to this post before messing with the .css again, and maybe the break cleared my head, but after I read your post, I tried again, and then realized I probably needed to set some other options in separateliselectors under theul.classsettings (in other words,ul.class liso that lists under theulwith the class defined would have their own options). After I did that, I have it working perfectly! Thank you!Why didn’t you simply set the #sidebar ul, and #sidebar li to {text-decoration: none}, I’m sure #sidebar ul li and maybe sidebar ul ul li would have to be fixed as well, but I haven’t looked at the theme to see how the sidebar is setup.
But by doing this, you aren’t introducing any new code or classes to jumble your template.To Lorelle: I meant to add that I wasn’t freaking out when I said, “Drop everything, I need your help!” I was just joking. Sorry if I came across as exasperating.
Miklb, I’ve just done that. You’re right, it’s a better idea. I don’t know why it is, but if there’s a harder way of doing something, I’ll find it. I don’t set out to do things the hard way, but I seem to have a knack for finding it. I think I tend to get so involved when I’m doing certain things, I miss the obvious or best solutions. Thanks.
The topic ‘Post/Page Lists vs. Sidebar Lists’ is closed to new replies.