Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Text wrap problem with subcats in category sidebox

Text wrap problem with subcats in category sidebox

Locked

Views: 1,506

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
27 Aug 2007, 12:52 AM
#1
dionysian avatar

dionysian

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Text wrap problem with subcats in category sidebox

Working on buyhanwei.com, running 1.3.7.1.

Having a minor problem...two of the "Japanese" subcategory names, "Performance Series" and "Tamahagane Steel," are too long and wrap. As you can see, they wrap around to the same alignment as the top level categories. This looks somewhat confusing.

How can I get the second word of these subcats to be aligned with their first word?

I've looked for an answer to this but it seems that everyone has been asking similar - but not the same question. Thanks!

27 Aug 2007, 1:06 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text wrap problem with subcats in category sidebox

Not an answer to aligning them but try this

admin > config > Layout Settings > Column Width - Left > increase to say 180-200

and then

admin > config > Layout Settings > Column Width - Left Boxes > a like increase as above

27 Aug 2007, 1:48 AM
#3
dionysian avatar

dionysian

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Re: Text wrap problem with subcats in category sidebox

Good suggestion, thanks. Fixed the problem. However, I imagine others are running into this, and for those using left and right sideboxes and needing to maximize space in the middle, hopefully there is a fix which will allow for smaller column widths.

27 Aug 2007, 3:53 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Text wrap problem with subcats in category sidebox

I don't think there is an effective dynamic fix, short of revamping tpl_categories.php to use actual <ul> lists. It would be possible to fix in the stylesheet and admin without altering PHP files if you had no more than one level of subcategories.

27 Aug 2007, 4:06 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Text wrap problem with subcats in category sidebox

One thing you can do is distinguish top cats from subcats by font style/size/color, background color, etc.

27 Aug 2007, 4:39 AM
#6
dionysian avatar

dionysian

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Re: Text wrap problem with subcats in category sidebox

gjh42:

One thing you can do is distinguish top cats from subcats by font style/size/color, background color, etc.

Another good suggestion, thanks.

I don't plan on having more than one level of subcategories, can you elaborate on your stylesheet fix?

Kobra's solution worked fine for me on this template, but I'm sure others who are using both columns could use the extra room and fix through the stylesheet...

27 Aug 2007, 5:04 AM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Text wrap problem with subcats in category sidebox

There is a setting in admin > Configuration > Layout Settings > Categories SubCategories Indent with default value of   

This puts two spaces ( ) in front of each subcat name, and is cumulative, i.e. four spaces in front of a sub-subcat. Eliminating one or both of the    will reduce the indent.

You can put the indent back so it applies to wrapped text as well by increasing margin-left or padding-left in the appropriate classes in your stylesheet.```
a.category-subs, a.category-products {
/background-color: #ff69ff;/
/color: #6699aa;/
/margin: 0.2em 0;/
margin-left: 0.2em; /adjust to taste/
/padding: 0.2em 0.3em;/
}

27 Aug 2007, 5:46 AM
#8
dionysian avatar

dionysian

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Re: Text wrap problem with subcats in category sidebox

Thanks...this is definitely not going to be my last ZC store and this is a valuable little aesthetic touch.