그누5에서
글쓰기할때 이미지 파일을 6개를 등록했습니다.
그러면 사진이
1
2
3
4
5
6
이렇게 세로로 나오는데
1 2 3
4 5 6
이런식으로 나오게 할 수 있을까요?
<div>
<?php
// 파일 출력
$v_img_count = count($view['file']);
if($v_img_count) {
for ($i=5; $i<=10; $i++) {
if ($view['file'][$i]['view']) {
//echo $view['file'][$i]['view'];
echo get_view_thumbnail($view['file'][$i]['view'] .
"<div style=\" margin:5px 0 20px 0;\">" . $view[file][$i][content] . "</div>");
}
}
}
?>
</div>
파일이 출력되는 소스는 이렇습니다...
답변 1개 / 댓글 1개
<style type="text/css">#전체 { width:800px; }.이미지감싸고있는클래스 { width:200px; margin:0 10px 10px 0; display:inline-block;}</style><div id="전체"><?if($v_img_count) { for ($i=5; $i<=10; $i++) { if ($view['file'][$i]['view']) { //echo $view['file'][$i]['view']; echo get_view_thumbnail($view['file'][$i]['view'] . "<div class='이미지감싸고있는클래스'>" . $view[file][$i][content] . "</div>"; } }}?></div>
css만 잘 조절하시면 지가 알아서 나누어집니다.
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.