사진과 사진사이에 여백을 없애려면..[급질] 정보
사진과 사진사이에 여백을 없애려면..[급질]
본문
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '200'; //썸네일 가로길이
$img_height = '120'; //썸네일 세로길이
$img_quality = '9'; //퀼리티 100이하로 설정
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<div class="latest">
<div class="latest_middle">
<? for ($i=0; $i<count($list); $i++) {
$img = "<img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' alt='이미지 없음' />";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;
$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);
// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<a href='{$list[$i][href]}'><img src='$thumb' width='$img_width' height='$img_height' alt='{$list[$i][subject]}' /></a>";
}
$wr_content = preg_replace("/<(.*?)\>/"," ",$list[$i][wr_content]);
$wr_content = preg_replace("/ /"," ",$wr_content);
$wr_content = str_replace("//##", " ", $wr_content);
$wr_content1 = cut_str(get_text($wr_content), 110, '…');
echo "<div class='latest_img'><div class='latest_img2'>".$img."</div></div>";
echo "<a href='{$list[$i]['href']}' style='color:#DDD;'>";
echo "</a></div><div class='latest_content'> <br></div>";
} ?>
</div>
</div>
http://hyeonho.codex.kr/ybnara/ 여기보시면 사진과 사진사이에 여백을 없애고 싶은데..
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '200'; //썸네일 가로길이
$img_height = '120'; //썸네일 세로길이
$img_quality = '9'; //퀼리티 100이하로 설정
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<div class="latest">
<div class="latest_middle">
<? for ($i=0; $i<count($list); $i++) {
$img = "<img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' alt='이미지 없음' />";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;
$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);
// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<a href='{$list[$i][href]}'><img src='$thumb' width='$img_width' height='$img_height' alt='{$list[$i][subject]}' /></a>";
}
$wr_content = preg_replace("/<(.*?)\>/"," ",$list[$i][wr_content]);
$wr_content = preg_replace("/ /"," ",$wr_content);
$wr_content = str_replace("//##", " ", $wr_content);
$wr_content1 = cut_str(get_text($wr_content), 110, '…');
echo "<div class='latest_img'><div class='latest_img2'>".$img."</div></div>";
echo "<a href='{$list[$i]['href']}' style='color:#DDD;'>";
echo "</a></div><div class='latest_content'> <br></div>";
} ?>
</div>
</div>
http://hyeonho.codex.kr/ybnara/ 여기보시면 사진과 사진사이에 여백을 없애고 싶은데..
댓글 전체

echo "<div class='latest_img'><div class='latest_img2'>".$img."</div></div>";
echo "<a href='{$list[$i]['href']}' style='color:#DDD;'>";
echo "</a></div><div class='latest_content'> <br></div>";
==><div class='latest_content'> <br></div> : 삭제해 보세요
echo "<a href='{$list[$i]['href']}' style='color:#DDD;'>";
echo "</a></div><div class='latest_content'> <br></div>";
==><div class='latest_content'> <br></div> : 삭제해 보세요

감사합니다.

div class인 latest_ ...영향을 받게되어 css 중 latest_ 가 어떻게 되어 있는지를 알아야 합니다.