Category alignment - php Form

Author Topic: Category alignment  (Read 2722 times)

Offline avalon2008

  • Supporter
  • **
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Category alignment
« on: July 14, 2008, 01:48:14 AM »


Super programme first of all. Installed very easily. I have just one question,

I want all the categories to be aligned at the top so every column starts in a line, at the moment what happens is when one column of categories gets more links than other columns the other columns drop down the page.

http://www.avalonwebsites.co.uk/dartlinks

you will see that column one is higher than the other 3, where can I find the code to change this... or what code do I need and where do I enter it.

many thanks

Avalon


Offline aleksa

  • Supporter
  • **
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Category alignment
« Reply #1 on: July 16, 2008, 06:28:09 AM »
In root/index.php search for:
Code: [Select]
if($config['rowresult']<$row['catnom'])
   echo '<td width="20%">';


Delete that row and replace it with:


Code: [Select]
if($config['rowresult']<$row['catnom'])
   echo '<td valign=top width="20%">';

http://linkovi.belgradecafe.net

 8) 8) 8)

Offline avalon2008

  • Supporter
  • **
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Category alignment
« Reply #2 on: July 17, 2008, 01:54:19 PM »
Brilliant works a treat. Very many thanks.

Offline alex

  • Global Moderator
  • *****
  • Posts: 77
  • Karma: +20/-0
    • View Profile
Re: Category alignment
« Reply #3 on: September 18, 2008, 12:23:49 AM »
to many <br>?
Code: [Select]
require_once('admin/config.php');
require_once('admin/options.php');
include('templates/'.$config['temp'].'/home.php');
$result = mysql_query("SELECT catid, cat, catnom FROM oscaty GROUP BY catnom, cat ASC")
or die(mysql_error());
?>
<DIV id=BODYS>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
<table class=topptable>
      <tr>
     <td width="20%">
<?php
while($row=mysql_fetch_array($result)){
if(
$config['rowresult']<$row['catnom'])
   echo 
'<td valign=top width="20%">';
if(
$config['rowresult']=$row['catnom'])
     echo 
'<DIV id=nava>';
     echo 
"<a href=\"catsy.php?id=$row[catid]\">$row[cat]</a>";
     echo 
'</DIV>';
       
$resulty mysql_query("SELECT linkid, text, linkurl, main FROM oslink WHERE idcat=".$row['catid']." ORDER by text ASC")
or die(
mysql_error()); 

while(
$link=mysql_fetch_array($resulty)){
if(
$link['main']==1){ 
     echo 
"&nbsp;<a href=\"links.php?id=$link[linkid]\">$link[text]</a><br>";
    
                }
 
       }
 echo 
"&nbsp;<a href=\"catsy.php?id=$row[catid]\">..</a>";
}
?>