초간단 최신글 소스인데요. 이미지 테두리에 공간이 생겨요 OTL 정보
초간단 최신글 소스인데요. 이미지 테두리에 공간이 생겨요 OTL본문
첨부한 사진에 style='border:1px solid #DEDEDE; 값이 있구요.
패딩은 다 0으로 해도 사진 아래쪽이 저렇게 되네요 대체 왜그럴까요 OTL
소스는 다음과 같습니다.
---------------------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width="788";
$img_height="178";
?>
<table width="<?=$img_width?>" height="<?=$img_height?>" border="0" cellspacing="0" cellpadding="0" style='border:1px solid #DEDEDE;'>
<tr><td>
<? for ($i=0; $i<count($list); $i++) {
$img = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $img)) { ?>
<a style="cursor:default;" href='<?=$list[$i]['href']?>'><img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$img?>' width='<?=$img_width?>' height='<?=$img_height?>' border='0'></a>
<?}
else if(preg_match("/\.(swf|wmv|asf|flv)$/i", $img))
{
echo"<script>doc_write(flash_movie('$g4[path]/data/file/$bo_table/$img', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>";
}
else{
echo"<img src='$latest_skin_path/img/noimage.gif' width='$img_width' border='0'></a>";
}?>
</td></tr>
<? if (count($list) == 0) { ?>
<tr><td align=center height=30 background="<?=$latest_skin_path?>/img/board_bg_line.gif">게시물이 없습니다.</td></tr>
<? } ?>
</table>
<? } ?>
패딩은 다 0으로 해도 사진 아래쪽이 저렇게 되네요 대체 왜그럴까요 OTL
소스는 다음과 같습니다.
---------------------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width="788";
$img_height="178";
?>
<table width="<?=$img_width?>" height="<?=$img_height?>" border="0" cellspacing="0" cellpadding="0" style='border:1px solid #DEDEDE;'>
<tr><td>
<? for ($i=0; $i<count($list); $i++) {
$img = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $img)) { ?>
<a style="cursor:default;" href='<?=$list[$i]['href']?>'><img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$img?>' width='<?=$img_width?>' height='<?=$img_height?>' border='0'></a>
<?}
else if(preg_match("/\.(swf|wmv|asf|flv)$/i", $img))
{
echo"<script>doc_write(flash_movie('$g4[path]/data/file/$bo_table/$img', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>";
}
else{
echo"<img src='$latest_skin_path/img/noimage.gif' width='$img_width' border='0'></a>";
}?>
</td></tr>
<? if (count($list) == 0) { ?>
<tr><td align=center height=30 background="<?=$latest_skin_path?>/img/board_bg_line.gif">게시물이 없습니다.</td></tr>
<? } ?>
</table>
<? } ?>
댓글 전체
원래 이미지에 공백이 있는 거 아닌가요?
이미지도 바꿔보고 테이블 크기 패딩 다 해봤는데 이유를 모르겠어요 ㅠㅠ
해결됐습니다. ^^;
어떻게 해결하셨나요?
테이블 문제였습니다;; 안에 테이블을 또 넣어주니깐 됐어요ㅎㅎ;;