다

최근게시물(갤러리)이 가로로 출력되지 않습니다.

· 2012-01-27 (금) 16:53:14 · 1089 · 2
<table width="499" cellspacing="0" cellpadding="0" bgcolor="#323232" border="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {?>

<td width="163" height="185" valign="top">
<?
for ($i=0; $i<count($list); $i++) {
$list[$i]['content']=eregi_replace(" "," ",$list[$i]['content']);


if($list[$i][file][0][file]) {
$file = "<img src='".$list[$i][file][0][path] .'/'. $list[$i][file][0][file]."' width=\"150\" height=\"124\" border=\"0\" valign=\"top\">";
} else {
$file="";
}
?>
<table width="163" height="185" cellspacing="0" cellpadding="0" style="background:url(<?=$g4['path']?>/images/box_bg.png); background-repeat:no-repeat"">
<tr>
<td width="163" height="5" colspan="3"></td>
</tr>
<tr><td width="4" height="129"></td>
<td width="155" height="129">

<table width="155" height="129" style="background:url(<?=$g4['path']?>/images/box_s.png); background-repeat:no-repeat">
<tr><td>
<a href="<?=$list[$i]['href']?>"><?=$file?></a>
</td>
<td width="4" height="129"></td>
</tr>
<tr><td width="163" height="5" colspan="3"></td>
</tr>
<tr><td width="4" height="46"></td>
<td width="155" height="46"></td>
<td width="4" height="46"></td>
</table></td> <?if($i!=count($list)-1) { ?>


</tr>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=30><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
</td>
<? } ?>
<? } ?>

</tr>
<? } ?>
<? if (count($list) == 0) { ?><? } ?>

</table>

계속 세로로만 출력되는데 어느부분이 잘못되었는지 알 수가 없습니다.
도와주세요
|

댓글 2개

<table width="499" cellspacing="0" cellpadding="0" bgcolor="#323232" border="0">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
$list[$i]['content']=eregi_replace(" "," ",$list[$i]['content']);

if($list[$i][file][0][file])
{
$file = "<img src='".$list[$i][file][0][path] .'/'. $list[$i][file][0][file]."' width=\"150\" height=\"124\" border=\"0\" valign=\"top\">";
}
else
{
$file="";
}
?>
<td width="163" height="185" valign="top">
<table width="163" height="185" cellspacing="0" cellpadding="0" style="background:url(<?=$g4['path']?>/images/box_bg.png); background-repeat:no-repeat"">
<tr>
<td width="163" height="5" colspan="2"></td>
</tr>
<tr>
<td width="4" height="129"></td>
<td width="155" height="129">
<table width="155" height="129" style="background:url(<?=$g4['path']?>/images/box_s.png); background-repeat:no-repeat">
<tr>
<td .colspan='2'>
<a href="<?=$list[$i]['href']?>"><?=$file?></a>
</td>
<td width="4" height="129"></td>
</tr>
<tr>
<td width="163" height="5" colspan="3"></td>
</tr>
<tr>
<td width="4" height="46"></td>
<td width="155" height="46"></td>
<td width="4" height="46"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<?
}//END for
<?
if(!count($list))
{
?>
<td align=center height=30><font color=#6A6A6A>게시물이 없습니다.</a></td>
<?
}
?>
</tr>
</table>

한줄 가로를 원하시는 것이면 이렇게 하시면 될듯 합니다
만약에 가로 칸이 안맞으면 for 문뒤에 여백을 넣어 주시면 됩니다
2012-01-28 (토) 11:18:58
감사합니다. ^^
잘 되네요. 두줄 적용도 한번 도전해 봐야겠습니다.~
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
12-01-27 조회 1,678
12-01-27 조회 1,399
12-01-27 조회 1,090
12-01-27 조회 1,066
12-01-27 조회 1,902
12-01-27 조회 1,057
12-01-27 조회 1,428
12-01-27 조회 1,657
12-01-27 조회 1,708
12-01-27 조회 1,687
12-01-27 조회 1,640
12-01-27 조회 1,363
12-01-27 조회 1,531
12-01-27 조회 902
12-01-27 조회 1,106
12-01-27 조회 1,561
12-01-27 조회 1,664
12-01-27 조회 1,227
12-01-27 조회 1,780
12-01-27 조회 1,329