Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Columns on index page

Quote Reply
Columns on index page
I can't figure out why the columns on my index page are coming out so asymmetrically. I'm having this problem here: http://www.sperience.net/...s/Wandering-the-Web/ but not in my other directory here: http://www.motivationalquotes.com/links/

I have not modified this line:
my ($half) = int (($#subcat+2) / 2);

Is there something else I could have screwed up in the site_html.pl file that would cause this behavior?
Quote Reply
Re: Columns on index page In reply to
I note that you don't specify any widths in the TD tags. The "problem" page has some longer cat names, so my guess is that the browser is assigning more of the table width to that cell. If you add width="50%" to both TD tags it should spread them equally.
Quote Reply
Re: Columns on index page In reply to
Thanks for the idea. It didn't work. The problem is the long category descriptions all being in one column. So I went through and edited those descriptions. It seems the script divides by number of categories so you can easily get unbalanced if your descriptions are unequal in length.
Quote Reply
Re: [Brad Richardson] Columns on index page In reply to
Brad, where exactly can I go to edit the TD tags to make it 50%? I try to search site_html.pl and can't find no such things. Anyone know?
Quote Reply
Re: [Boinky] Columns on index page In reply to
If you're using templates, look in site_html_templates.pl, last sub (sub site_html_print_cat), find these, add the red:

# Print Header.
$output = qq|<div class="margin"><table width="80%" border="0" cellspacing="0" cellpadding="0"><tr><td class="catlist" valign="top" width="50%">\n|;

and

# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</td><td class="catlist" valign="top" width="50%">\n|;


Leonard
aka PerlFlunkie