Zen Cart Logo
Forums / General Questions / change line spacing in category list??

change line spacing in category list??

Views: 1,565

Results 1 to 14 of 14
26 Feb 2012, 4:35 PM
#1
lrfowler avatar

lrfowler

Zen Follower

Join Date:
May 2008
Location:
san francsico
Posts:
135
Plugin Contributions:
0

change line spacing in category list??

So I managed to get a line as a separator in my list of categories..I'm so proud....but now the line spacing seems excessive....How do I chage it from whatever it is now (double line spacing?) to like single line spacing...
please see
http://www.2muchfunclub.net

thanks:clap:

26 Feb 2012, 4:43 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: change line spacing in category list??

I have to say it looks OK as is to me, but you can tighten things up by adding this to your stylesheet:

#categoriesContent {line-height: 1em;}

Adjust the 1em to taste.

I would also turn off the category counts and consider increasing the width of the left column so that your category names don't wrap - much easier to read that way.

26 Feb 2012, 4:46 PM
#3
lrfowler avatar

lrfowler

Zen Follower

Join Date:
May 2008
Location:
san francsico
Posts:
135
Plugin Contributions:
0

Re: change line spacing in category list??

thanks for replying...I tried increasing the width of the left column.......but then it fell to the bottom of the page......It seems I have to adjust the width of the middle column???
How do I do that?

thanks

26 Feb 2012, 5:03 PM
#4
stevesh avatar

stevesh

Black Belt

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

Re: change line spacing in category list??

The sidebox column widths are set in Admin - Configuration - Layout Settings. I don't know what your template designer may have done to mess that up, though.

26 Feb 2012, 5:17 PM
#5
lrfowler avatar

lrfowler

Zen Follower

Join Date:
May 2008
Location:
san francsico
Posts:
135
Plugin Contributions:
0

Re: change line spacing in category list??

Jade.....was the author....Cherry Zen template.....how do I change the middle column setting?
I changed the category line spacing...thanks.....but no the lines are wrapping into each other......

26 Feb 2012, 5:38 PM
#6
lrfowler avatar

lrfowler

Zen Follower

Join Date:
May 2008
Location:
san francsico
Posts:
135
Plugin Contributions:
0

Re: change line spacing in category list??

How do I turn off 'All Products' in the Categories Listing on the left side?

26 Feb 2012, 6:00 PM
#7
stevesh avatar

stevesh

Black Belt

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

Re: change line spacing in category list??

There are two sidebox width settings in Layout Settings for each column - it looks like you may have changed only one.

All Products switch is also in Layout Settings.

26 Feb 2012, 7:36 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: change line spacing in category list??

A couple of comments:
You have essentially replicated the first step I took that led to the creation of Categories Dressing five years ago, adding the <hr> after a category link (or all of them, in your case). However, you have used <hr id="catBoxDivider" /> which gives dozens of elements with the same id.
An id is supposed to be unique on a page, so you should change your code to <hr class="catBoxDivider" />. You now have doubled dividers at the bottom of the category list, so you should turn off the original one in Configuration > Layout Settings > Categories - Separator between Links.

On a completely different topic, I notice you have pasted a complete HTML document inside your category description. This extra doctype, head and body code will cause major validation errors on your page, and each browser will have to try to correct the output, possibly with different results in different browsers.

You need to strip your content of all these container tags and put the style rules in your stylesheet instead of in the middle of the page code.

26 Feb 2012, 8:48 PM
#9
lrfowler avatar

lrfowler

Zen Follower

Join Date:
May 2008
Location:
san francsico
Posts:
135
Plugin Contributions:
0

Re: change line spacing in category list??

so change all <hr id="catBoxDivider" /> to <hr class="catBoxDivider" /> ................why is that good?.......and where would I make this change?

"On a completely different topic, I notice you have pasted a complete HTML document inside your category description. This extra doctype, head and body code will cause major validation errors on your page, and each browser will have to try to correct the output, possibly with different results in different browsers." - do you mean the 'hard saddlebags' page?

26 Feb 2012, 10:33 PM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: change line spacing in category list??

You want to change the <hr> from id to class because it is against HTML/CSS standards to have an id appear more than once on a page. Validators will flag these as errors, and search engines (Google at least) are starting to consider the errors on a page when figuring its ranking.
You said that you had managed to get a line as a separator, so I assumed you knew what you had done to make that happen. You would have to edit that location in tpl_categories.php and change the id to class.

The particular page I saw that on was the "hard saddlebags", but you need to make sure there is not anything similar elsewhere.

26 Feb 2012, 10:45 PM
#11
lrfowler avatar

lrfowler

Zen Follower

Join Date:
May 2008
Location:
san francsico
Posts:
135
Plugin Contributions:
0

Re: change line spacing in category list??

thanks for replying.....I forgot how I got the separator to happen.......!!

although there are few other 'id's' on the page...

26 Feb 2012, 10:58 PM
#12
lrfowler avatar

lrfowler

Zen Follower

Join Date:
May 2008
Location:
san francsico
Posts:
135
Plugin Contributions:
0

Re: change line spacing in category list??

How would I get rid of the blank space on top of the page??

26 Feb 2012, 11:07 PM
#13
gjh42 avatar

gjh42

Black Belt

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

Re: change line spacing in category list??

stylesheet.css (line 232)

body {
font-family: "Lucida Grande",tahoma,verdana,arial,helvetica,sans-serif;
font-size: 73.5%;
margin-top: 20px;
}

There can be any number of different ids on a page, but the same id should not repeat.

26 Feb 2012, 11:16 PM
#14
lrfowler avatar

lrfowler

Zen Follower

Join Date:
May 2008
Location:
san francsico
Posts:
135
Plugin Contributions:
0

Re: change line spacing in category list??

thank you gj