▶ 도움 주실 분께 사례하겠습니다.. (썸네일 간격 관련)
초보라 죄송합니다만..ㅜㅜ
썸네일(정확하게는, 미리 제작해 둔 이미지들)을 연속적으로 붙여서 보여주는 기능을 구현하는데
소스를 여기저기 아무리 수정해 보아도 이미지의 간격(좌우, 위아래)이 없어지질 않는군요..;;
이 간격을 결정하는 요소가 다른 어느곳에 또 있을 수 있나요..?
참고로, 썸네일은 미리 서버에 올려둔 이미지를 차례로 불러오는 방법을 택했습니다. 이미지의 크기는 모두 동일..
다소 급한 사안인지라, 도움 주시는 분께는 약소하나마 사례를 생각하고 있습니다. 실례가 안된다면..
--------------- 소스 (해당 테이블 부분 일부만) --------------
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<div id="gallery">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td text-align:left; margin-right:0px; margin-left:0px;>
<?
for ($i=count($list)-1; $i>=0; $i--) { //
if ((count($list)-$i-1)%$mod==0) //
echo "</tr><tr><td colspan=0 height=0></td></tr>";
$style = "";
$list[$i][subject] = str_replace(" "," ",$list[$i][subject]);
$image = $list[$i][file][0][file];
$thumb = $thumb_path.'/'.$list[$i][wr_id].'.jpg'; // 미리 저장해둔 이미지 불러옴
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";
$list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
$list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
$list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
echo "<td width=0 valign=top align=left style='padding:0px;'>";
echo "<td width=0 valign=top align=left style='word-break:break-all; padding:0px;'>";
echo "<table align=center>";
echo "<tr height=0><td align=left width=0><div style='border:0px solid #ccc; background:#fff; padding:0px; font-size:0; line-height:0;'><a href='{$list[$i][href]}' title=".$list[$i][wr_name]."><img src='$thumb' border=0 width='$board[bo_1]'></a></div></div></td></tr>";
echo "</td></tr>";
echo "</table></td>\n";
}
// 나머지 빈 테이블
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='$board[bo_1]'></td>";
?>
</td>
</tr>
<tr><td colspan=0 height=0></td></tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
썸네일(정확하게는, 미리 제작해 둔 이미지들)을 연속적으로 붙여서 보여주는 기능을 구현하는데
소스를 여기저기 아무리 수정해 보아도 이미지의 간격(좌우, 위아래)이 없어지질 않는군요..;;
이 간격을 결정하는 요소가 다른 어느곳에 또 있을 수 있나요..?
참고로, 썸네일은 미리 서버에 올려둔 이미지를 차례로 불러오는 방법을 택했습니다. 이미지의 크기는 모두 동일..
다소 급한 사안인지라, 도움 주시는 분께는 약소하나마 사례를 생각하고 있습니다. 실례가 안된다면..
--------------- 소스 (해당 테이블 부분 일부만) --------------
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<div id="gallery">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td text-align:left; margin-right:0px; margin-left:0px;>
<?
for ($i=count($list)-1; $i>=0; $i--) { //
if ((count($list)-$i-1)%$mod==0) //
echo "</tr><tr><td colspan=0 height=0></td></tr>";
$style = "";
$list[$i][subject] = str_replace(" "," ",$list[$i][subject]);
$image = $list[$i][file][0][file];
$thumb = $thumb_path.'/'.$list[$i][wr_id].'.jpg'; // 미리 저장해둔 이미지 불러옴
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";
$list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
$list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
$list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
echo "<td width=0 valign=top align=left style='padding:0px;'>";
echo "<td width=0 valign=top align=left style='word-break:break-all; padding:0px;'>";
echo "<table align=center>";
echo "<tr height=0><td align=left width=0><div style='border:0px solid #ccc; background:#fff; padding:0px; font-size:0; line-height:0;'><a href='{$list[$i][href]}' title=".$list[$i][wr_name]."><img src='$thumb' border=0 width='$board[bo_1]'></a></div></div></td></tr>";
echo "</td></tr>";
echo "</table></td>\n";
}
// 나머지 빈 테이블
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='$board[bo_1]'></td>";
?>
</td>
</tr>
<tr><td colspan=0 height=0></td></tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
첨부파일
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기
댓글 3개
<table border="0" cellpadding="0" cellspacing="0" width="100%"> --> width="100%" 빼기
2.
echo "<td width=0 valign=top align=left style='padding:0px;'>";
echo "<td width=0 valign=top align=left style='word-break:break-all; padding:0px;'>";
echo "<table align=center>";
echo "<tr height=0><td align=left width=0><div style='border:0px solid #ccc; background:#fff; padding:0px; font-size:0; line-height:0;'><a href='{$list[$i][href]}' title=".$list[$i][wr_name]."><img src='$thumb' border=0 width='$board[bo_1]'></a></div></div></td></tr>";
-->
echo "<tr><td>";
<a href='{$list[$i][href]}' title=".$list[$i][wr_name]."><img src='$thumb' border=0 width='$board[bo_1]'></a>";
echo "</td></tr>";
echo "</table></td>\n";
3. 테이블 태그와 div 태그가 쌍이 잘 안맞는듯합니다.
제가 제시한게 안맞을 수도 있어여.
그런데 역시 결과는 같군요..ㅜㅜ
소스에 보이지 않는 스타일같은게 작용할 수도 있을까요..? ㅡ.ㅡ
묘하게도(원래 그런가요..?) 테이블 내에 spacing과 폰트 사이즈까지 다 줄이고 나니 정상 동작 하네요..ㅜㅜ
테이블을 너무 얕보았어요..ㅎㅎ