Originally posted by ideavirus
How do i align the link/word Unix Hosting to the right side instead of left side ?? I just want to align the word Unix Hosting to right and nothing else and likewise with the rest fo category names !
a couple of things:
[list=1][*]do you have a different image for each category?
if so i'm thinking you will need to add a field to the category table and put the image name in that field for that category.
ooops...I just saw an image field so forget this....
[*]to align things to the right use something like the following:
Code:
<p align=right>$cat_name</p> or
<div align=right>$cat_name</div>
or if in a table then <td align=right>$cat_name</td>
[/list=1]
I think this is something like what you want
Code:
<TABLE width=100% cellpadding=4 cellspacing=0>
<TR>
<TD ALIGN=right COLSPAN=2>
<A HREF="$cat_url">$cat_name</A>
</TD>
</TR>
<TR>
<TD ROWSPAN=2>
<A HREF="$cat_url">$image</A>
</TD>
<TD WIDTH="100%">
$cat_desc
</TD>
</TR>
<TR><TD WIDTH="100%">
<A HREF="$hosted_by">$hosted_by</A>
</TD>
</TR>
</TABLE>
convert that to INDEXU code:
Code:
$category .="<TABLE width=100% cellpadding=4 cellspacing=0>";
$category .="<TR><TD ALIGN=right COLSPAN=2><A HREF=\"$cat_url\">$cat_name</A></TD></TR>";
$category .="<TR><TD ROWSPAN=2><A HREF=\"$cat_url\">$image</A></TD>";
$category .="<TD WIDTH="100%">$cat_desc</TD></TR>";
$category .="<TR><TD WIDTH="100%">$hosted_by</TD></TR>";
$category .="</TABLE>";
yep, the td width is set at 100% on purpose
the above would replace
Code:
$category .= "<p>";
$category .= "$image <FONT FACE=$cat_font_face SIZE=$cat_font_size>";
$category .= "<B><A class=lblack HREF=\"$cat_url\">$cat_name</A></B> $html_number_of_links \n";
$category .= "$number_of_links\n";
if($this->show_description) {
if(!empty($cat_description)) $category .= "<br>";
//$category .= "<a style='font-size: 11px; color: #567E96;'>$cat_description</a>\n";
$category .= "$cat_desc \n";
}
if($this->show_subcat) $category .= "<br>";
I have assumed a field called $hosted_by. you will need to add the $hosted_by variable to the idx_category table and populate the field as needed.
$hosted_by is a URL. if you want to use a name, you would create a $hosted_by_name field ( and maybe it would be $hosted_by_url instead of just $hosted_by ).
the code I propose assumes you always have a cat desc and you always want to show it.
I don't use the cat image, desc, subcats, etc so I can't test the above. but it looks like it should work. Kinda. Sorta. Maybe....
Just some random thoughts on this.
I love vB. I love vB. I love vB...