테이블 어디서 문제인지.. 어렵네요..
latest.skin.php 소스인데요.
테이블 정렬이
가운데로 정렬이 되야하는데
내용물이 점차적으로 쏠리네요.. 내려갈수록
어디문제인지 좀...팁좀 주세요 ㅠ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$cols = 1; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 10; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
?>
<style type="text/css">
<!--
.data { font-family:돋움; font-size:8pt; color:#999999; }
-->
</style>
<table width="344" height="162" border="0" cellspacing="5" cellpadding="5" background="<?=$latest_skin_path?>/img/bg_banner.jpg">
<tr><? for ($i=0; $i<count($list); $i++) { if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; } ?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<table cellpadding=0 cellspacing=0 border=0 width="100%">
<tr>
<td align='center' valign=middle>
<table align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" valign='middle'>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle">
<?
$ex1_filed = explode("|", $list[$i][wr_1]);
$ext1_00 = explode(" ", $ex1_filed[0]);
$ext2_02 = explode(" ", $ex2_filed[2]);
$ext2_09 = explode(" ", $ex2_filed[9]);
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 75);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/noimage.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'><tr><td valign=middle align='center'>";
echo "<a href='{$list[$i]['href']}'><img src='{$img}' width='150' height='50' border='0' title='$title'></a><br></td></tr>";
echo "'<tr><td valign=middle align='center'><a href='{$list[$i]['href']}'><b><font color='#0099ff'>{$ext1_00[0]}</font></b></a>";
echo "</td></tr><tr><td bgcolor='#f0f0f0' height='1'></td></tr><tr><td width=$thum_width>";
echo "<a href='{$list[$i]['href']}'><font color='#ff6600'>{$list[$i][ca_name]}</font> </a></td><td>";
echo "<a href='{$list[$i]['href']}'><font style='font-family:돋움; font-size:9pt; color:#333333;'>{$list[$i]['subject']}</a>";
echo "</td></tr></table>";
?>
<? if (count($list) == 0) { echo "게시물이 없습니다."; } ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<? } ?>
</tr>
</table>
테이블 정렬이
가운데로 정렬이 되야하는데
내용물이 점차적으로 쏠리네요.. 내려갈수록
어디문제인지 좀...팁좀 주세요 ㅠ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$cols = 1; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 10; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
?>
<style type="text/css">
<!--
.data { font-family:돋움; font-size:8pt; color:#999999; }
-->
</style>
<table width="344" height="162" border="0" cellspacing="5" cellpadding="5" background="<?=$latest_skin_path?>/img/bg_banner.jpg">
<tr><? for ($i=0; $i<count($list); $i++) { if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; } ?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<table cellpadding=0 cellspacing=0 border=0 width="100%">
<tr>
<td align='center' valign=middle>
<table align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" valign='middle'>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle">
<?
$ex1_filed = explode("|", $list[$i][wr_1]);
$ext1_00 = explode(" ", $ex1_filed[0]);
$ext2_02 = explode(" ", $ex2_filed[2]);
$ext2_09 = explode(" ", $ex2_filed[9]);
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 75);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/noimage.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'><tr><td valign=middle align='center'>";
echo "<a href='{$list[$i]['href']}'><img src='{$img}' width='150' height='50' border='0' title='$title'></a><br></td></tr>";
echo "'<tr><td valign=middle align='center'><a href='{$list[$i]['href']}'><b><font color='#0099ff'>{$ext1_00[0]}</font></b></a>";
echo "</td></tr><tr><td bgcolor='#f0f0f0' height='1'></td></tr><tr><td width=$thum_width>";
echo "<a href='{$list[$i]['href']}'><font color='#ff6600'>{$list[$i][ca_name]}</font> </a></td><td>";
echo "<a href='{$list[$i]['href']}'><font style='font-family:돋움; font-size:9pt; color:#333333;'>{$list[$i]['subject']}</a>";
echo "</td></tr></table>";
?>
<? if (count($list) == 0) { echo "게시물이 없습니다."; } ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<? } ?>
</tr>
</table>
댓글 2개
12년 전
가운데 정렬 하시고싶으신 td가셔서 style='text-align:center' 해보셔요
ohora
12년 전
필요없이 테이블이 많이 들어 갔네요.
<table width="344" height="162" border="0" cellspacing="5" cellpadding="5" background="<?=$latest_skin_path?>/img/bg_banner.jpg">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) {
echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>";
} ?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<table cellpadding=0 cellspacing=0 border=0 width="100%">
<tr>
<td align='center' valign=middle>
<?
$ex1_filed = explode("|", $list[$i][wr_1]);
$ext1_00 = explode(" ", $ex1_filed[0]);
$ext2_02 = explode(" ", $ex2_filed[2]);
$ext2_09 = explode(" ", $ex2_filed[9]);
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 75);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/noimage.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign=middle align='center'>";
echo "<a href='{$list[$i]['href']}'><img src='{$img}' width='150' height='50' border='0' title='$title'></a><br></td></tr>";
echo "'<tr><td valign=middle align='center'><a href='{$list[$i]['href']}'><b><font color='#0099ff'>{$ext1_00[0]}</font></b></a>";
echo "</td></tr><tr><td bgcolor='#f0f0f0' height='1'></td></tr><tr><td width=$thum_width>";
echo "<a href='{$list[$i]['href']}'><font color='#ff6600'>{$list[$i][ca_name]}</font> </a></td><td>";
echo "<a href='{$list[$i]['href']}'><font style='font-family:돋움; font-size:9pt; color:#333333;'>{$list[$i]['subject']}</a>";
echo "</td></tr></table>";
?>
<? if (count($list) == 0) { echo "게시물이 없습니다."; } ?>
</td>
</tr>
</table>
</td>
<? } ?>
</tr>
</table>
조금 더 간결하게 해도 될것 같네요.
<table width="344" height="162" border="0" cellspacing="5" cellpadding="5" background="<?=$latest_skin_path?>/img/bg_banner.jpg">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) {
echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>";
} ?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<table cellpadding=0 cellspacing=0 border=0 width="100%">
<tr>
<td align='center' valign=middle>
<?
$ex1_filed = explode("|", $list[$i][wr_1]);
$ext1_00 = explode(" ", $ex1_filed[0]);
$ext2_02 = explode(" ", $ex2_filed[2]);
$ext2_09 = explode(" ", $ex2_filed[9]);
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 75);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/noimage.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign=middle align='center'>";
echo "<a href='{$list[$i]['href']}'><img src='{$img}' width='150' height='50' border='0' title='$title'></a><br></td></tr>";
echo "'<tr><td valign=middle align='center'><a href='{$list[$i]['href']}'><b><font color='#0099ff'>{$ext1_00[0]}</font></b></a>";
echo "</td></tr><tr><td bgcolor='#f0f0f0' height='1'></td></tr><tr><td width=$thum_width>";
echo "<a href='{$list[$i]['href']}'><font color='#ff6600'>{$list[$i][ca_name]}</font> </a></td><td>";
echo "<a href='{$list[$i]['href']}'><font style='font-family:돋움; font-size:9pt; color:#333333;'>{$list[$i]['subject']}</a>";
echo "</td></tr></table>";
?>
<? if (count($list) == 0) { echo "게시물이 없습니다."; } ?>
</td>
</tr>
</table>
</td>
<? } ?>
</tr>
</table>
조금 더 간결하게 해도 될것 같네요.
게시판 목록
그누4 질문답변
그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.
기존 게시물은 열람만 가능합니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 66474 | 11년 전 | 3617 | ||
| 66473 | 11년 전 | 2669 | ||
| 66472 | 11년 전 | 4860 | ||
| 66471 |
hoonii
|
11년 전 | 4435 | |
| 66470 | 11년 전 | 2249 | ||
| 66469 | 11년 전 | 3104 | ||
| 66468 |
100볼트
|
11년 전 | 3096 | |
| 66467 |
몬스터박스
|
11년 전 | 2112 | |
| 66466 |
몬스터박스
|
11년 전 | 2657 | |
| 66465 |
lsj9894
|
11년 전 | 2438 | |
| 66464 |
테크노관리자
|
11년 전 | 2847 | |
| 66463 | 11년 전 | 2875 | ||
| 66462 |
커네드커네드
|
11년 전 | 3227 | |
| 66461 | 11년 전 | 2641 | ||
| 66460 | 11년 전 | 3309 | ||
| 66459 |
narasarang
|
11년 전 | 2603 | |
| 66458 |
AnnieK
|
11년 전 | 3366 | |
| 66457 | 11년 전 | 3232 | ||
| 66456 | 11년 전 | 2084 | ||
| 66455 | 11년 전 | 3257 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기