Ok, after spending all day trying different scenarios, I give up! Your help is very much needed. I am using links2 and templates, with 2 columns. I can get it looking decent in one browser, but yucky in another. I've tried different widths, using % and pixel and just can't get it just right. Here is what I have settled with, though I'm not satisfied with the results....
site_html_templates.pl
# Print Header.
$output = qq|<div class="margin"><table width=100& border="0" cellspacing="1" cellpadding="4"><tr><td class="catlist" valign="top" width=45%">\n|;
foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];
# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
# 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="220">\n|; $output .= qq|<td class="catlist" valign="top" width="220">\n|;}$i++;
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span class="descript">$description </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}
# Don't forget to end the unordered list..
$output .= "</td></tr></table></div>\n";
return $output;
}
1;
---------------------------------------
home.html
<center>
<table border=0 width=95% bgcolor=#000000><tr><td>
<table border=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpadding=0>
<tr><td bgcolor="#F1DBD6" width=40%><font face="Verdana, Helvetica" size=3><b>Categories</b></font></td></tr>
<tr><td bgcolor="#F7F7F7"><font face="Verdana, Helvetica, Arial" size=2>
<%category%>
</font></tr></td>
</table>
</td></tr></table>
</center>
I'm sure there is a minor conflict somewhere, but where?
Thanks,
Beckie
http://its-here.virtualave.net
site_html_templates.pl
# Print Header.
$output = qq|<div class="margin"><table width=100& border="0" cellspacing="1" cellpadding="4"><tr><td class="catlist" valign="top" width=45%">\n|;
foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];
# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
# 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="220">\n|; $output .= qq|<td class="catlist" valign="top" width="220">\n|;}$i++;
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span class="descript">$description </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}
# Don't forget to end the unordered list..
$output .= "</td></tr></table></div>\n";
return $output;
}
1;
---------------------------------------
home.html
<center>
<table border=0 width=95% bgcolor=#000000><tr><td>
<table border=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpadding=0>
<tr><td bgcolor="#F1DBD6" width=40%><font face="Verdana, Helvetica" size=3><b>Categories</b></font></td></tr>
<tr><td bgcolor="#F7F7F7"><font face="Verdana, Helvetica, Arial" size=2>
<%category%>
</font></tr></td>
</table>
</td></tr></table>
</center>
I'm sure there is a minor conflict somewhere, but where?
Thanks,
Beckie
http://its-here.virtualave.net