Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: table turinio centravimas

Parašė Lordcraft· 2010 Bal. 14 16:04:29
#1

Turiu stai tokia panel bet niekaip nesiseka sucentruoti tos table turinio. jame yra keturios paneles. meginau visur prideti center tagu bet niekaip nesigauna.:

<?php


echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>\n";
echo "<td width='25%'>\n";
echo "<b><span style='color:silver'>Naujienos:</span></b><br><br>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."news WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_datestamp DESC LIMIT 0,5");
while ($data = dbarray($result)) {
$title = $data['news_subject'];
$sh_title = $title;
$n_id = $data['news_id'];
$v_id = $data['news_reads'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=$n_id");
$date = $data['news_datestamp'];
$n_date = showdate("%d-%m-%Y", $date);
echo "<a href='".BASEDIR."news.php?readmore=$n_id'>".trimlink($sh_title,25)."<br>";
}
echo "<br>\n";
echo "</td>\n";
echo "<td width='25%'>\n";
echo "<b><span style='color:silver'>Siuntiniai:</b><br><br>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
while ($data = dbarray($result)) {

echo "<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&d_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 25)."</a><br>";
}
echo "<br>\n";
echo "</td>\n";
echo "<td width='25%'>\n";
echo "<b><span style='color:silver'>Strainspiai:</b><br><br>\n";
$result = dbquery(
   "SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
   INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
   WHERE ".groupaccess('article_cat_access')." ORDER BY article_datestamp DESC LIMIT 0,5");
while ($data = dbarray($result)) {

echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>".trimlink($data['article_subject'],25)."</a><br>";
}
echo "<br>\n";
echo "</td>\n";
echo "<td width='25%'>\n";
echo "<b><span style='color:silver'>Nuorodos:</b><br><br>\n";
$result = dbquery("SELECT * FROM ".DB_PREFIX."news WHERE news_cat='irašyk kategorijos ID' AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_reads DESC LIMIT 0,5");
while ($data = dbarray($result)) {
$title = $data['news_subject'];
$sh_title = $title;
$n_id = $data['news_id'];
$v_id = $data['news_reads'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=$n_id");
$date = $data['news_datestamp'];
$n_date = showdate("%d-%m-%Y", $date);
echo "<a href='".THEME."news.php?readmore=$n_id'>".trimlink($sh_title,15)."<br>";
}
echo "<br>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table></td></center>\n";


?>



Parašė smart· 2010 Bal. 14 16:04:38
#2

Pridėk stebuklingą koduką prie table koduko ir vuolia:

<table align='center' ...



Redagavo smart· 2010 Bal. 14 16:04:52

Parašė Lordcraft· 2010 Bal. 14 18:04:44
#3

buvau pridejes, ir td tage ir pries table ir pries td vnz niekaip nesigauna.

Parašė webzlt· 2010 Bal. 14 18:04:42
#4

nebandei taip:
<td><div style-"text-alig:center;">kodas</div></td>
arba
<td><center>kodas</center></td>




Parašė bobalt· 2010 Bal. 14 18:04:18
#5

<td valign='middle' align='center'>tekstas</td>


Nemėginai šitaip?

Parašė Lordcraft· 2010 Bal. 15 02:04:08
#6

nieks nepadeda, visur meginau prikistu tu tagu...