Author Topic: Category layout help  (Read 5576 times)

0 Members and 1 Guest are viewing this topic.

Offline Optimum

  • Newbie
  • *
  • Posts: 26
    • View Profile
Category layout help
« on: March 29, 2006, 10:24:23 AM »
Hi,

I've managed to do a lot to my template of 4images, but I'm having 2 problems that I've been unable to solve so far.
Because it's kinda hard to explain, I made a picture:





As you can see, I'm having vertical aligment problem. I'd like to have main categories aligned, no matter how many subcategories there are on certan categories. Can this be done? I've manage to aligne subcategories under their main categories, but can't fix the vertical aligment.

Another thing is the color of subcategories. Can this be changed? Since it's a link, I'm afraid it uses the link class.
Can I change the subcategories colors?

TIA!!
Mat
« Last Edit: April 01, 2006, 11:09:17 AM by Optimum »

Offline Optimum

  • Newbie
  • *
  • Posts: 26
    • View Profile
Vertical category aligment
« Reply #1 on: March 29, 2006, 10:33:24 AM »
Hi,

I've managed to do a lot to my template of 4images, but I'm having 2 problems that I've been unable to solve so far.
Because it's kinda hard to explain, I made a picture:



As you can see, I'm having vertical aligment problem. I'd like to have main categories aligned, no matter how many subcategories there are on certan categories. Can this be done? I've manage to aligne subcategories under their main categories, but can't fix the vertical aligment.

Another thing is the color of subcategories. Can this be changed? Since it's a link, I'm afraid it uses the link class.
Can I change the subcategories colors?

TIA!!
Mat
« Last Edit: April 01, 2006, 11:09:36 AM by Optimum »

Offline Optimum

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Vertical category aligment
« Reply #2 on: March 29, 2006, 10:52:33 AM »
ok, I've fixed the color problem, so ignore that :)

But still no luck with vertical aligment..

Pls hlp..
TIA!!
Mat

Offline Optimum

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Category layout help
« Reply #3 on: March 30, 2006, 10:19:31 AM »
Well, I did it..

I added this code:
Code: [Select]
  $b = 1;
  $c = 2;
  $d = 3;
      if ($num_subs == $b) {
        $sub_cat_list .= "<br><br><br>";
}
if ($num_subs == $c) {
        $sub_cat_list .= "<br><br>";
}
if ($num_subs == $d) {
        $sub_cat_list .= "<br>";
}

into functions.php

DON'T flame me, I know it could be done a lot nicer and more "hi-tec", but this is the first piece of php that I EVER wrote.
And so far so good. Categories are vertically aligned so I'm happy... for now. Will see when I'll have more categories in, what will happen then. But I think it should work.

So thanks to.. myself I guess :D

If anyone has a nicer solution, I'm still looking ;) Don't want to crash the server or something with my code :D

TIA,
Mat