Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Style categories sidebox as list items?

Style categories sidebox as list items?

Locked

Views: 950

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
24 Nov 2008, 3:52 AM
#1
brianb avatar

brianb

New Zenner

Join Date:
Nov 2008
Posts:
12
Plugin Contributions:
0

Style categories sidebox as list items?

Hi everyone,

I have a current site (https://www.sacredsuds.com) using static html pages and I am trying to set up Zen Cart to be visually similar. I have been managing to teach myself enough CSS to modify make a lot of progress, but I have something specific that I am thoroughly stuck on and thought I'd throw it out to see if anyone can help.

The way I have been styling borders and padding in the css for my sideboxes depends on the links in the sideboxes being coded as list items. This is fine for most of the sideboxes, like the information, EZ pages, etc. However, the categories sidebox is coded as anchors and line breaks, so the css I have been using does not come out right. Only the text is underlined and I have not successfully padded each of the links to get the spacing right. The page I am working on is at https://www.sacredsuds.com/store. You can quickly see what I mean if you compare the categories sidebox (which is not displaying the way that I want) with the important links sidebox (which IS displaying the correct way).

So, my question is, does anyone know how to code css for anchors to make them look like the lower box? Or, conversely, is it easy to turn the categories links into a list instead of text section of anchors and line breaks (and, more importantly, would that break anything or cause any problems?) I'd prefer going the css route and leaving the other files alone, all things being equal.

Thanks in advance!

24 Nov 2008, 4:02 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: Style categories sidebox as list items?

Check the Free Add Ons section for some other category boxes that might be easier to style.

BTW- Great job of matching your existing site!!

24 Nov 2008, 4:08 AM
#3
brianb avatar

brianb

New Zenner

Join Date:
Nov 2008
Posts:
12
Plugin Contributions:
0

Re: Style categories sidebox as list items?

EDIT

I have figured out the spacing through a simple bottom padding (guess I was being dense before...) but I still am stuck on the borders. How to get them to go all the way across the sidebar instead of just underlining the existing text?

24 Nov 2008, 9:05 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Style categories sidebox as list items?

You can either use the Categories Dressing mod which makes the necessary adjustments to display the <a> elements as list items, or the modified tpl_categories.php I posted a while back which actually changes the coding to <ul> lists: Sub categories displayed when hover over categories?, post 5.

24 Nov 2008, 9:25 PM
#5
brianb avatar

brianb

New Zenner

Join Date:
Nov 2008
Posts:
12
Plugin Contributions:
0

Re: Style categories sidebox as list items?

Huh -- I never even considered that a different addon might style the categories box differently -- that's an interesting suggestion. However, Glenn, thanks for the link. It looks like that might be just what I was looking for, so I'll start there. Thanks!

And Kim, thanks for the compliment :smile: