Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Table columns offcenter ns/ie

Quote Reply
Table columns offcenter ns/ie
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
Quote Reply
Re: Table columns offcenter ns/ie In reply to
FYI

I found a typo in the above script. I corrected it, but it did not solve my problem, so any help would be appreciated.

Beckie

------------------
IT'S HERE! The easy to use directory!
http://its-here.virtualave.net
Quote Reply
Re: Table columns offcenter ns/ie In reply to
Beckie,

You may be looking in the wrong place. I note that you are using "class=" parameters in your HTML. Does that mean you are using style sheets? If so, the problem may be in links.css, not in site_html_templates.pl.
Quote Reply
Re: Table columns offcenter ns/ie In reply to
Thanks,

I deleted the css and did some minor "tweaking" and got it looking pretty good.

Beckie

------------------
IT'S HERE! The easy to use directory!
http://its-here.virtualave.net