뷰페이지 이미지를 나누려면
본문
뷰페이지 이미지가 순서대로 세로로 쭉 나열 되잖아요,
3칸 정도 나눠서 이미지가 출력이 됐으면 좋겠거든요
이미지1 | 이미지2 | 이미지3 |
이미지4 | 이미지5 | 이미지6 |
이런식으로 출력되게 하고 싶거든요, 굳이 섬네일 만들지 않구
그냥 출력해서 뽑아오게 하고 싶은데 방법이 없을까요?
사하님 갤러리를 쓰구 있구요 뽑아오는 소스는 아래인 것 같습니다.
// 파일 출력
$tmp_width=" width='{$board[bo_image_width]}' name=";
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view]){
if($view[file][$i][image_width] >= $board[bo_image_width])
$view[file][$i][view]=preg_replace("/name=/i",$tmp_width,$view[file][$i][view]);
$src = $view[file][$i][path]."/".$view[file][$i][file];
$images= $view[file][$i][view];
$images = str_replace("name='target_resize_image[]'","",$view[file][$i][view]);
$images = str_replace("onclick='image_window(this);' style='cursor:pointer;'","class='view_img'",$images);
if ($width > 100) { $width = $width."px"; } else { $width = $width; }
echo "<p class='ac' style='width:$width'><a class=\"fancybox\" href='$src' data-fancybox-group='$view[wr_id]' title='$view[wr_subject]'>".$images . "</a><span class='img_shadow'></span></p>";
}
}
도움 좀 주시면 감사하겠습니다, 테이블이나 div로 나누면 될 거 같은데 방법이 없을까요ㅠㅠ?
!-->답변 2
18번째 라인에 style='width:$width'
이 부분을, style='width: 33.3%; float: left;' 정도로 수정 하면 될 것 같네요.
혹은, style='width: $width' 이 부분을 아에 제거 하고 스킨 내의 style.css 에
.ac { width: 33.3%; float: left; }
코드를 추가 하면 됩니다.
좋은 질뭉 감사합니다~
답변을 작성하시기 전에 로그인 해주세요.