Jump to content

[SOLVED] PHP / CSS problem


flowingwindrider

Recommended Posts

I wasn't sure if my problem exists with my css code or in my php script, so I figured I'd just post here and hope for the best. If my css code reads (in part):

 

.style6{
font-family: "Poor Richard";
font-size: 14pt;
text-align: center;
        width: 100%;
}

 

and my php code reads (in part):

 

echo "<table>";
echo "<tr class=\"style6\">";
if($page != 1)
{
$pageprev = $page - 1; 
echo("<td><a href=\"employ.php?page=$pageprev\">Previous ".$limit." Listings - </a></td>");
}
else
{
echo("<td>Previous ".$limit." Listings - </td>");
}

$numofpages = $totalrows / $limit;
for($i = 1; $i <= $numofpages; $i++)
{
if($i == $page)
	{
	echo("<td>".$i."</td>");
	}
	else
	{
	echo("<td><a href=\"employ.php?page=$i\">$i</a></td>");
	}
}

if(($totalrows % $limit) != 0)
{
if($i == $page)
	{
	echo("<td>".$i."</td>");
	}
	else
	{
	echo("<td><a href=\"employ.php?page=$i\">$i</a></td>");
	}
}

if(($totalrows - $limit * $page) > 0)
{
$pagenext = $page + 1;
echo("<td><a href=\"employ.php?page=$pagenext\">Next ".$limit." Listings</a></td>");
}
else
{
echo("<td> - Next ".$limit." Listings</td>");
}

echo ("</tr></table");

 

then can anyone tell me why the scripts is ignoring only the part of the css that aligns the text to the center? It applies the font and size perfectly, it just won't align.

Link to comment
https://forums.phpfreaks.com/topic/60672-solved-php-css-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.