카테고리 가로갯수와 갯수 지정하는방법
본문
1. 카테고리 분류항목에서 가로갯수를 지정할수 잇나요?
2. 가로갯수 지정시 만약 분류가 넓어지면 반토막나서 반은 위에 반은 아래에 걸쳐지는데
만약 창 크기에따라 걸쳐지면 아래로 내려가게끔 할수는 없나요?
예)현재모습
전체 원룸 쓰리룸 아파
트 빌라/연립 단독주택
이렇게 창크기가 끈기면 아파트가 아래로 다내려가는게 아니고 걸쳐져서 '트' 가 아래로 내려가버립니다.
예) 바꾸고 싶은 모양
전체 원룸 쓰리룸
아파트 빌라/연립 단독주택
이렇게 창크기가 넘어가면 분류항목이 아예 밑으로 자동으로 내려가지게끔 할수있나요?
카테고리 소스입니다.
<? if (!$sca){?><a id=current href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'><b><font color=#ffffff>전체</font></b>
<font color=#dddddd>(<?
$total=sql_fetch("select sum(bo_count_write ) as cnt from $g4[board_table] where bo_table IN('$bo_table')");
echo "$total[cnt]";
?>)</font>
<?}else{?>
<a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'>전체
<font color=#888888>(<?
$total=sql_fetch("select sum(bo_count_write ) as cnt from $g4[board_table] where bo_table IN('$bo_table')");
echo "$total[cnt]";
?>)</font>
<?}?>
</a></li><? if ($is_category) { ?>
<?
$cnt = 1;
$cnt0 = 0;
$bb_s=""; $bb_e="";
$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "";
$f_open="id=current";
$f_close="";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
$sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name = '$arr[$i]' and wr_is_comment = 0 ";
$row1 = sql_fetch($sql1);
if ($sca == $arr[$i]) { $cnt0++; $b_s="<b style='color: white;'>";$cc=$f_open; $b_e="</b>"; } else {$b_s=""; $cc=$f_close; $b_e="";}
if ($sca == $arr[$i]) {
$str .= "<li><a $cc href='./board.php?bo_table=$bo_table&sca=" . rawurlencode($arr[$i]) . "'>$b_s$arr[$i]$b_e <font color=#dddddd>($row1[cCount])</font></a></li>"; }
else {
$str .= "<li><a $cc href='./board.php?bo_table=$bo_table&sca=" . rawurlencode($arr[$i]) . "'>$b_s$arr[$i]$b_e <font color=#888888>($row1[cCount])</font></a></li>"; }
$cnt++;
}
if ($cnt0 == 0 ) { $bb_s="<b>"; $bb_e="</b>"; }
?>
<?=$str?>
<? } ?>
<font color=#dddddd>(<?
$total=sql_fetch("select sum(bo_count_write ) as cnt from $g4[board_table] where bo_table IN('$bo_table')");
echo "$total[cnt]";
?>)</font>
<?}else{?>
<a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'>전체
<font color=#888888>(<?
$total=sql_fetch("select sum(bo_count_write ) as cnt from $g4[board_table] where bo_table IN('$bo_table')");
echo "$total[cnt]";
?>)</font>
<?}?>
</a></li><? if ($is_category) { ?>
<?
$cnt = 1;
$cnt0 = 0;
$bb_s=""; $bb_e="";
$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "";
$f_open="id=current";
$f_close="";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
$sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name = '$arr[$i]' and wr_is_comment = 0 ";
$row1 = sql_fetch($sql1);
if ($sca == $arr[$i]) { $cnt0++; $b_s="<b style='color: white;'>";$cc=$f_open; $b_e="</b>"; } else {$b_s=""; $cc=$f_close; $b_e="";}
if ($sca == $arr[$i]) {
$str .= "<li><a $cc href='./board.php?bo_table=$bo_table&sca=" . rawurlencode($arr[$i]) . "'>$b_s$arr[$i]$b_e <font color=#dddddd>($row1[cCount])</font></a></li>"; }
else {
$str .= "<li><a $cc href='./board.php?bo_table=$bo_table&sca=" . rawurlencode($arr[$i]) . "'>$b_s$arr[$i]$b_e <font color=#888888>($row1[cCount])</font></a></li>"; }
$cnt++;
}
if ($cnt0 == 0 ) { $bb_s="<b>"; $bb_e="</b>"; }
?>
<?=$str?>
<? } ?>
답변 2
전체 카테고리를 읽고 만약 3개 이상이라면 아래로 내려가게 만들어버리면 되겠지요
즉 3 6 9 12 뭐 이런식으로 3의 배수가 나오면 그다음에는 아래로 내려가는 클래스를 넣으시던지 해서 줄바꿈을 하세요
즉 3 6 9 12 뭐 이런식으로 3의 배수가 나오면 그다음에는 아래로 내려가는 클래스를 넣으시던지 해서 줄바꿈을 하세요
헐~~~
<li style="width:32%"
li에 이렇게 넣어보세요
<li style="width:32%"
li에 이렇게 넣어보세요
답변을 작성하시기 전에 로그인 해주세요.