카테고리css 문의드립니다.
관련링크
본문
적용된 css
/* 상품 목록 카테고리 목록 */
.sct_ct {text-align:center;width:100%;border-bottom:1px solid #e9e9e9; background:#ebebeb; }
.sct_ct h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
.sct_ct ul {list-style:none;display:inline-block;margin:0;padding:0px 0; }
.sct_ct ul:after {display:block;visibility:hidden;clear:both;content:""}
.sct_ct ul li {display:inline-block;background:url(img/sbmn_bg.gif) no-repeat left 50%; width:60px; height:30px;letter-spacing:0.2em;font-size:0.917em;}
.sct_ct ul li:first-child{background:none}
.sct_ct a {text-decoration:none;color:#656565; }
.sct_ct_parent {font-weight:bold}
.sct_ct_here {background:#0066CC; width:60px; height:30px; color:#ff3600 !important}
listcategory.skin 소스는 아래와같습니다
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$str = '';
$exists = false;
$depth2_ca_id = substr($ca_id, 0, 2);
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '${depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_order, ca_id ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
if (preg_match("/^{$row['ca_id']}/", $ca_id))
$sct_ct_here = 'sct_ct_here';
else
$sct_ct_here = '';
$str .= '<li ><a href="./list.php?ca_id='.$row['ca_id'].'" class="'.$sct_ct_here.'">'.$row['ca_name'].'</a></li>';
$exists = true;
}
if ($exists) {
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0);
?>
<!-- 상품분류 1 시작 { -->
<aside id="sct_ct_1" class="sct_ct">
<h2>현재 상품 분류와 관련된 분류</h2>
<ul>
<?php echo $str; ?>
</ul>
</aside>
<!-- } 상품분류 1 끝 -->
<?php } ?>
답변 1
a(anchor) 태그는 기본 속성이 display:inline 형식의 요소이므로
display:block 형식으로 변경해야 가로 세로 / 사이즈를 지정할 수 있습니다.
.sct_ct_here {background:#0066CC; width:60px; height:30px; color:#ff3600 !important;display: block;}
display:block 을 추가 해보세요.
!-->