머

살려주세요 ㅠㅠ

· 2010-04-16 (금) 20:09:37 · 1797 · 6

게시판을 수정중인데 이미지배열 때문에 죽겠씁니다.

[ 0 ][ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ][ 10 ][ 11 ][ 12 ]
현재 이런 이미지배열인데 이걸

겔러리형식처럼 밑에 처럼 바꾸고 싶습니다.
[ 0 ][ 1 ][ 2 ][ 3 ]<br>
[ 4 ][ 5 ][ 6 ][ 7 ]<br>
[ 8 ][ 9 ][ 10 ][ 11 ]<br>
[ 12 ]


$pre=$total-(($page-1)*$admin[2]);
$last=$pre-$admin[2];
if($last<0) { $last=0;}
for($i=$pre ; $i>$last ; $i--)
{

if($i%5==1) { echo "<br>"; }  <-- 이걸 누군가가 이거 알려줬는데 해봣는데 잘안되네요

소스좀 고쳐주세요 ㅜㅜ

|

댓글 6개

if($i != 0 && $i%4==0) { echo "<br>"; }
<div style="width: 450px;">
<div style="float:left;width:100px;height:80px;margin:5px;">내용1</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용2</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용3</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용4</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용5</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용6</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용7</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용8</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용9</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용10</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용11</div>
<div style="float:left;width:100px;height:80px;margin:5px;">내용12</div>
</div>

이런식으로
테두리 정하시고
그안에 float:left로 <br>없이 불러오시면
지정한 폭안에서 자동으로 내려가서 나열됩니다.
명랑패인님꺼는 안되요 가로줄은 맞는데 뒤죽박죽되네요 ㅠㅠ
찌까니님까 해볼께요
와 찌까니님 됐어요 ㅎㅎㅎ 아 너무 고마워요 정말 정말
^^
아 진짜 고마워요 속이 뻥뚤렸어요 2시간동안 화장실도 안가고 낑낑댔는데,...
쵝오~~~~~~~
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

203,335건
+
제목 글쓴이 날짜 조회
10-04-17 조회 1,625
10-04-17 조회 1,907
10-04-17 조회 1,772
10-04-17 조회 1,839
10-04-17 조회 4,273
10-04-17 조회 1,787
10-04-16 조회 1,798
10-04-16 조회 1,966
10-04-16 조회 1,926
10-04-16 조회 2,518
10-04-16 조회 1,684
10-04-16 조회 1,868
10-04-16 조회 2,140
10-04-16 조회 1,747
10-04-16 조회 1,925
10-04-16 조회 1,873
10-04-16 조회 1,872
10-04-16 조회 4,171
10-04-16 조회 1,877
10-04-16 조회 2,242