최근게시물을 두줄로 하려면 어느부분을 수정해야 할까요? 정보
최근게시물을 두줄로 하려면 어느부분을 수정해야 할까요?본문
현재 갤러리 형태의 최근게시물을 가로로 출력하고 있습니다.
게시물이 3개를 넘길경우 다음 줄로 (총 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=\"157\" height=\"130\" border=\"0\" align=\"center\">";
}
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="130"></td>
<td width="157" height="130">
<table width="157" height="130">
<tr>
<td .colspan='2'>
<a href="<?=$list[$i]['href']?>"><?=$file?></a>
</td>
<td width="4" height="130"></td>
</tr>
<tr>
<td width="163" height="5" colspan="3"></td>
</tr>
<tr>
<td width="4" height="46"></td>
<td width="157" height="46"></td>
<td width="4" height="46"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<?
}
?>
<? if(!count($list))
{
?>
<td align=center height=30><font color=#6A6A6A>게시물이 없습니다.</a></td>
<?
}
?>
</tr>
</table>
게시물이 3개를 넘길경우 다음 줄로 (총 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=\"157\" height=\"130\" border=\"0\" align=\"center\">";
}
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="130"></td>
<td width="157" height="130">
<table width="157" height="130">
<tr>
<td .colspan='2'>
<a href="<?=$list[$i]['href']?>"><?=$file?></a>
</td>
<td width="4" height="130"></td>
</tr>
<tr>
<td width="163" height="5" colspan="3"></td>
</tr>
<tr>
<td width="4" height="46"></td>
<td width="157" height="46"></td>
<td width="4" height="46"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<?
}
?>
<? if(!count($list))
{
?>
<td align=center height=30><font color=#6A6A6A>게시물이 없습니다.</a></td>
<?
}
?>
</tr>
</table>
댓글 전체