But I need to add a right border down the centre. So it needs to be on the first cell, but then on, every 2 cells.
So far all I am getting is the first one with a border, then the third one (directly below), and then the one below that doesn't get a border, but it gets it on the 6th cell (so a border on the right edge of the browser).
I need it straight down the middle.
Code: Select all
if($cat % $n == 0 && $cat != 0) // If $c is divisible by $n...
{
// New table row
echo '</tr><tr>';
}
echo "<td width='50%'><div class='";
if ($row->catid == $catid) { echo " mainmenusubon";}
else { echo "mainmenusub";}
echo "' ";
$x++;
if(fmod($x,3) == 0 || $x == 1)
{
// New table row
echo "style='border-right: 1px solid #ffff00;'";
}
echo ">
<a href='/categ/$row->catid/$categreplace'>$row->category</a></div></td>";
$cat++;