최근게시물(갤러리)이 가로로 출력되지 않습니다. 정보
최근게시물(갤러리)이 가로로 출력되지 않습니다.본문
<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>
계속 세로로만 출력되는데 어느부분이 잘못되었는지 알 수가 없습니다.
도와주세요
<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>
계속 세로로만 출력되는데 어느부분이 잘못되었는지 알 수가 없습니다.
도와주세요
댓글 전체
<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 문뒤에 여백을 넣어 주시면 됩니다
<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 문뒤에 여백을 넣어 주시면 됩니다
감사합니다. ^^
잘 되네요. 두줄 적용도 한번 도전해 봐야겠습니다.~
잘 되네요. 두줄 적용도 한번 도전해 봐야겠습니다.~