Forums / Templates, Stylesheets, Page Layout / Adding padding to the category links in sidebar

Adding padding to the category links in sidebar

Views: 732

Results 1 to 4 of 4
12 Oct 2012, 12:56 PM
#1
mickyholmes avatar

mickyholmes

New Zenner

Join Date:
Sep 2012
Location:
Belfast, Ireland
Posts:
27
Plugin Contributions:
0

Adding padding to the category links in sidebar

Hello,
I'm trying to add a little padding to the links in the category sidebar but I can't understand why it won't work! It seems that I can add padding left and right but not top and bottom.

I notice that in the html these links are marked up as a table, has this got something to do with it? I can style the contact us and site map links further down fine, but not the category links.

i've tried all sorts of things but can't add top or bottom padding to the links.

here's a link to the site.
(the yellow boxes are only there for myself, so that I can see what I'm targeting... i intend to turn them off.)

Attachment 11297

Please help someone, this is driving me crackers!

Thanks,
Michael

12 Oct 2012, 2:03 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Adding padding to the category links in sidebar

Here's one way:

a.category-top {line-height: 2em;}

12 Oct 2012, 2:34 PM
#3
mickyholmes avatar

mickyholmes

New Zenner

Join Date:
Sep 2012
Location:
Belfast, Ireland
Posts:
27
Plugin Contributions:
0

Re: Adding padding to the category links in sidebar

perfect!

.....I've wasted half a day trying to do that, nearly went crazy!

thanks again,
Michael

12 Oct 2012, 5:47 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding padding to the category links in sidebar

Be aware that that will space out long multi-line category names the same as different category names. If you want to distinguish long names by keeping them together, you need some other styling or coding. There are mods like Categories Dressing that will facilitate that and much more, or you can make
a.category-top {display: block;}
and be able to control padding and margins precisely. There are other issues of spacing that arise when you do that, but they can be handled with the right CSS.