박스카테고리 글씨를 가운데 정력 하는 방법좀 알려주세요
본문
위와 같이 박스카테고리 내용이 왼쪽에 붙어 있어요..
이걸 중간으로 변경하려고 하는데.. 고수님들 방법좀 알려주세요...
boxcategory.php
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);
?>
<!-- 쇼핑몰 카테고리 시작 { -->
<nav id="gnb">
<h2>쇼핑몰 카테고리</h2>
<div class="hd_inner">
<ul id="gnb_1dul">
<?php
// 1단계 분류 판매 가능한 것만
$hsql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where length(ca_id) = '2' and ca_use = '1' order by ca_id ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{
// 2단계 분류 판매 가능한 것만
$sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where LENGTH(ca_id) = '4' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_id ";
$result2 = sql_query($sql2);
$count = mysql_num_rows($result2);
?>
<li class="gnb_1dli" style="z-index:<?php echo $gnb_zindex; ?>">
<a href="<?php echo G5_SHOP_URL.'/list.php?ca_id='.$row['ca_id']; ?>" class="gnb_1da<?php if ($count) echo ' gnb_1dam'; ?>"><?php echo $row['ca_name']; ?></a>
<?php
for ($j=0; $row2=sql_fetch_array($result2); $j++)
{
if ($j==0) echo '<ul class="gnb_2dul">';
?>
<li class="gnb_2dli"><a href="<?php echo G5_SHOP_URL; ?>/list.php?ca_id=<?php echo $row2['ca_id']; ?>" class="gnb_2da gnb_2da<?php echo $j%2; ?>"><?php echo $row2['ca_name']; ?></a></li>
<?php }
if ($j>0) echo '</ul>';
?>
</li>
<?php } ?>
</ul>
<ul id="snb">
<!-- <li><a href="<?php echo G5_SHOP_URL; ?>/cart.php" id="snb_cart">장바구니</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/wishlist.php" id="snb_wish">위시리스트</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/orderinquiry.php" id="snb_delivery">배송조회</a></li>-->
</ul>
</div>
</nav>
<!-- } 쇼핑몰 카테고리 끝 -->
style.css
#gnb {background:#FF0000;color:#fff;font-family:gulim,'굴림'; font-weight:bold;:zoom:1;background-image:url(/comn/img/grf50.png);background-repeat:repeat-x;background-position:0 0;height:44px;z-index:500;position:relative;z-index:10;}
#gnb:after {display:block;visibility:hidden;clear:both;content:''}
#gnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#gnb a {display:block;text-decoration:none}
#gnb .gnb_1da, #snb a {padding:0 41px;height:44px;color:#fff;line-height:3.9em; }
#gnb .gnb_1da:focus, #gnb .gnb_1da:hover, #snb a:focus, #snb a:hover {background-color:#FF5E00}
#gnb_1dul {float:left;zoom:1;}
#gnb_1dul:after {display:block;visibility:hidden;clear:both;content:''}
.gnb_1dli {position:relative;float:left; }
.gnb_1dli_on {color:#fff;text-decoration:none}
.gnb_1dli_over {background-color:#FF5E00}
#gnb .gnb_1da {line-height:3.9em}
#gnb .gnb_1dam {padding-right:40px;background:url('img/gnb_bg01.gif') center right no-repeat}
.gnb_2dul {display:none;z-index:1000;position:absolute;border:1px solid #7c7c7c;border-top:0}
.gnb_1dli_over .gnb_2dul, .gnb_1dli_over2 .gnb_2dul {display:block;top:44px;left:-1px;width:168px;background:#fff}
.gnb_2da {display:none}
.gnb_1dli_over .gnb_2da {display:block;padding:13px 10px;color:#6c6c6c}
.gnb_1dli_over .gnb_2da:focus, .gnb_1dli_over .gnb_2da:hover {background:#585858;color:#fff;text-decoration:none}
.gnb_2da0 {background:#f8f8f8}
.gnb_2da1 {}
#snb {float:right;color:#fff;zoom:1}
#snb:after {display:block;visibility:hidden;clear:both;content:''}
#snb li {float:left}
답변을 작성하시기 전에 로그인 해주세요.