Please, I know this is a newbie question, but I couldn’t find solution anywhere (though I found few similar topics, but without any replays).. Any help would be appreciated.
You don’t need that, especially since it would mean modifying the core files.
Simply use your style.css file (aka stylesheet) and increase the margin/padding between the li items in that list.
But I don’t need space between each 2 categories, but only some of them… Any easy way to do that?
What moshu is trying to suggest is that you give each (or specific)
<li> (list items) on your stylesheet (CSS file) a unique class with a padding or margin top values. Something such as this should work:
li.spacing {
margin-top: 10px;
}
^ something to that nature.
You would then need to match the html by doing :
<ol>
<li>Item One - no margin</li>
<li class="spacing">Item Two - 10px margin</li>
<li class="spacing">Item Three - 10px margin</li>
<li class="spacing">Item Four - 10px margin</li>
</ol>
It is going to require a little bit of extra work on your side if you only want specific ones to have spacing.
Hope this helps !
-Ryan
Actually, since the cat list is generated by template tag(s) you cannot really add manually your own classes.
However, in the latest version the code generates something like this:
<li class="cat-item cat-item-1">
Use it π
Hm, I’m not sure in which file is that HTML code that needs to be modified?
In sidebar.php, there is only PHP code for generating categories list.
Thanks
@moshu
I didn’t see your post. I don’t really get how I’m supposed to use that, could you be more specific please?
Thanks
There is NO such code in any template files. THat’s the output – you can see it when looking at your source code…
And knowing what the output is – edit your stylesheet accrodingly.
More: Finding_Your_CSS_Styles
Andrejc,
If you want to link me to your page I can try to help you get the spacing on your category links. I’ll provide you with a small sample css snippet so that you can have something to work with.
aeonex,
That’s not the way we offer help here, i.e. requesting a link in exchange!
Moshu,
Sorry moshu :/. I won’t do it again ^^.
Ok, let’s say that I want top margin on category item 16. Then css should be smth like this:
li.cat-item cat-item-16 {
margin-top: 30px;
}
Is that right?
Nope.
.cat-item-16 {
margin-top: 30px;
}
It still won’t work π Do I need to insert it to some specific part of style.css?
Actually, it works with some other css modifiers (like font-size), but not with margin-top.