Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to modify categories sidebox list

How to modify categories sidebox list

Locked

Views: 3,871

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
6 Dec 2007, 7:40 PM
#1
walterlyn avatar

walterlyn

New Zenner

Join Date:
Dec 2007
Posts:
9
Plugin Contributions:
0

How to modify categories sidebox list

I want to add some space between categories list items so that there would be some more space between links, but how to do this?
I see that this list is made with <br> tags and <a> links
I tried to change it in css with a{ margin-top:n px } and br {margin-top: n px} [this is only code fragment to give the idea], but with no success, so is there a way to modify this list with css and not go where php starts?

6 Dec 2007, 7:47 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: How to modify categories sidebox list

You can address the categories links with
a.category-top {}
etc., and similar selectors. Look in view source to see what others you may want to change.

Categories Dressing allows many other kinds of customizations to the categories if this CSS doesn't do everything you want.

6 Dec 2007, 7:59 PM
#3
walterlyn avatar

walterlyn

New Zenner

Join Date:
Dec 2007
Posts:
9
Plugin Contributions:
0

Re: How to modify categories sidebox list

I tried this selector.
For example this code

a.category-top{
background-color: red;
color:pink;
font-size: 19px;
margin-top: 10px;
}

reacts only for background, color and size but margins stay fixed, this is maybe links can't have margins but if I add display: block it drops what is left after link to another line.

6 Dec 2007, 8:28 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: How to modify categories sidebox list

The display: block; will have that effect if you do not remove a <br /> that is coded into tpl_categories.php (the <br /> is necessary for the ordinary categories arrangement).
Inline elements do not react to margins.

You may want to use Categories Dressing, as this is set up for block-type display already. You can turn off or not use any of its features you don't need.

If you don't want the effects of block display, you might try adding
line-height: 2em;
to the declaration (adjust as required).

6 Dec 2007, 8:34 PM
#5
walterlyn avatar

walterlyn

New Zenner

Join Date:
Dec 2007
Posts:
9
Plugin Contributions:
0

Re: How to modify categories sidebox list

Well then I'll try to look at this categories dressing tool.

6 Dec 2007, 8:36 PM
#6
nomadrw avatar

nomadrw

Zen Follower

Join Date:
Sep 2007
Location:
Somewhere in Southern Cal
Posts:
331
Plugin Contributions:
0

Re: How to modify categories sidebox list

You need to open your css file
look for this
#navColumnOneWrapper, #navColumnTwoWrapper, #mainWrapper {
margin: auto;
}
and do this

#navColumnTwoWrapper, #mainWrapper {
margin: auto;
}

#navColumnOneWrapper{
margin: your size here .px;
}

nomad

6 Dec 2007, 8:43 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: How to modify categories sidebox list

Umm, what will that accomplish? (relevant to the OP)

I just tested the line-height, and it does work in a stock categories box.

7 Dec 2007, 11:49 PM
#8
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Re: How to modify categories sidebox list

There is a nice mod for better styling your categories...

17 Jan 2008, 9:17 PM
#9
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: How to modify categories sidebox list

digidiva-kathy:

There is a nice mod for better styling your categories...

I was just wondering if that still works with v1.37 as I need the mouseover effect it gives for a client.

betty

18 Jan 2008, 12:34 AM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: How to modify categories sidebox list

I don't know what particular mouseover effect you are wanting, but you don't need a whole mod (BetterCategories or Categories Dressing) to get hover effects.

You can style things in your stylesheet like a.category-top:hover {color: #aabbcc; font-weight: bold; background-color: #112233; etc.}.

What effect did you want?

18 Jan 2008, 12:52 AM
#11
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: How to modify categories sidebox list

I wanted the effect that looked like each category line has that look of "horizontal window blinds". I am having a brain cramp coming up with the term, but the EZcategories mod does it, I just wasn't sure if it was 1.37 compliant.

So while waiting for a reply, I downloaded it, and installed it just for the categories and information boxes and it still works. So once I got rid of the pointer images and put my colors into the style sheet, I got the exact look I needed.

I will copy down what you suggested though for times I don't need the "full frontal assault" weapon for a client though..lol

thank you!

betty

18 Jan 2008, 12:56 AM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: How to modify categories sidebox list

Hmm... is that a dynamic "dropdown menu" effect, or just that the appearance of the items is different from the usual on hovering?
Do you mean lines separating the items? You get that with border-top: or border-bottom:

18 Jan 2008, 4:14 AM
#13
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: How to modify categories sidebox list

gjh42:

Hmm... is that a dynamic "dropdown menu" effect, or just that the appearance of the items is different from the usual on hovering?
Do you mean lines separating the items? You get that with border-top: or border-bottom:

It's not really dynamic at all (I don't think) it's just a great mod that did all the work for me.

It works like a javascript tab or hover style menu. Has a nice mouseover effect, has it's own stylesheet for colors, padding, borders, spacing, etc. To me it just adds a nice finished effect to the category sidebox, and depending on the store the information side box. I just hadn't had the need for it for a while due to the various templating styles I was doing to sites. This site specifically needs the effect it gives.

I just hope as zencart grows, that someone monitors the mod and keeps it compliant!!

betty

17 Feb 2008, 6:29 AM
#14
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: How to modify categories sidebox list

gjh42:

If you don't want the effects of block display, you might try adding
line-height: 2em;
to the declaration (adjust as required).Once again.. Glenn is my savior.. I was driving myself nuts, and went looking for what I KNEW was a simple answer.. sigh

Man I need to go to bed.. This was too simple.. If I wasn't working on 3 hours of sleep it might have come to me.. But anywhoo.. Thanks Glenn.. again..:smile: