아래로 나오는 2단메뉴가 잘 안되는데 어떻게 해야 되나요?

아래로 나오는 2단메뉴가 잘 안되는데 어떻게 해야 되나요?

QA

아래로 나오는 2단메뉴가 잘 안되는데 어떻게 해야 되나요?

본문

메뉴에 마우스를 올리면 드롭다운되는 2단 메뉴를 만들으려고 만들었는데 잘 안되네요 뭐가 문제인가요?

마우스를 올리면 파란색으로 효과가 나타나는거 같은데 드롭다운 메뉴가 안생기네요. 어디가 잘못된걸까요?

이분이 head.php입니다. 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가


include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
include_once(G5_LIB_PATH.'/poll.lib.php');
include_once(G5_LIB_PATH.'/visit.lib.php');
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/popular.lib.php');


// 상단 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
if ($config['cf_include_head'] && is_file(G5_PATH.'/'.$config['cf_include_head'])) {
    include_once(G5_PATH.'/'.$config['cf_include_head']);
   return; // 이 코드의 아래는 실행을 하지 않습니다.
}


if (G5_IS_MOBILE) {
    include_once(G5_MOBILE_PATH.'/head.php');
    return;
}
?>


<!-- 상단 시작 { -->
<div id="hd">
    <h1 id="hd_h1"><?php echo $g5['title'] ?></h1>


    <div id="skip_to_container"><a href="#container">본문 바로가기</a></div>


    <?php
    if(defined('_INDEX_')) { // index에서만 실행
        include G5_BBS_PATH.'/newwin.inc.php'; // 팝업레이어
    }
    ?>


    <div id="hd_wrapper">


		<div id="twitter">
			<a target="_blank" href="https://twitter.com/amecenter"> <img src="<?php echo G5_IMG_URL ?>/twitter_ame.png" alt="amecenter twitter"></a>
		</div>	<!--end of twitter-->
		
        <div id="logo">
            <a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/ame_logo.png" alt="<?php echo $config['cf_title']; ?>"></a>
        </div>	<!--end of logo-->
    </div>


  
<div id="wrapper">
    <nav id="gnb">
        <ul>
            <?php
            $sql = " select *
                        from {$g5['menu_table']}
                        where me_use = '1'
                          and length(me_code) = '2'
                        order by me_order, me_id ";
            $result = sql_query($sql, false);
            $gnb_zindex = 900; // gnb_1dli z-index 값 설정용


            for ($i=0; $row=sql_fetch_array($result); $i++) {
            ?>
            <li class="gnb_1dli" style="z-index:<?php echo $gnb_zindex--; ?>">
                <a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>"><span><?php echo $row['me_name'] ?></span></a>
               <?php
                $sql2 = " select *
                            from {$g5['menu_table']}
                            where me_use = '1'
                              and length(me_code) = '4'
                              and substring(me_code, 1, 2) = '{$row['me_code']}'
                            order by me_order, me_id ";
                $result2 = sql_query($sql2);


                for ($k=0; $row2=sql_fetch_array($result2); $k++) {
                    if($k == 0)
                        echo '<ul>'.PHP_EOL;
                ?>
                    <li><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>"><span><?php echo $row2['me_name'] ?></span></a></li>
                <?php
                }


                if($k > 0)
                    echo '</ul>'.PHP_EOL;
                ?>
            </li>
            <?php
            }


            if ($i == 0) {  ?>
                <li>메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
            <?php } ?>
        </ul>
    </nav>
</div>
<!-- } 상단 끝 -->


<hr>


<!-- 콘텐츠 시작 { -->
<div id="wrapper">
    <div id="aside">
		<div id="outlogin">
			<?php echo outlogin('basic'); // 외부 로그인  ?>
		</div> <!--end of outlogin -->


		<!-- ?php echo latest("basic", menu07_01, 5, 25); ? --> 


		<div id="gongzi">
			<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=menu07_01"><img src="<?php echo G5_IMG_URL ?>/gongzi.png" alt="gonzi"></a>
			<?php echo latest("basic", menu07_01, 5, 14); ?>	
			
		</div> <!--end of gongzi -->


		<?php echo poll('basic'); // 설문조사  ?>


		<div id="event">
			<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=menu03_01"><img src="<?php echo G5_IMG_URL ?>/event.png" alt="event"></a>
		</div>	<!--end of event -->


		<div id="kangnam">
			<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=menu03_02 ?> "><img src="<?php echo G5_IMG_URL ?>/kangnam.png"  alt="kangnam"></a>
		</div>	<!--end of kangnam -->


		<div id="bkangnam">
			<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=menu03_03 ?> "><img src="<?php echo G5_IMG_URL ?>/bkangnam.png" alt="bkangnam"></a>
		</div>	<!--end of bkangnam -->


		<div id="zibang">
			<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=menu03_04 ?> "><img src="<?php echo G5_IMG_URL ?>/zibang.png" alt="zibang"></a>
		</div>	<!--end of zibang -->
	</div>	<!--end of aside -->
	
    <div id="container">
        <?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><div id="container_title"><?php echo $g5['title'] ?></div><?php } ?>		

 

그리고 이부분이 default.css 입니다.

[code]

@charset "utf-8";

/* SIR 지운아빠 */


/* 초기화 */

html {overflow-y:scroll}

body {margin:0;padding:0;font-size:0.75em;font-family:dotum}

html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0}

h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}


#hd ul, nav ul, #ft ul {margin:0;padding:0;list-style:none}

legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}

label, input, button, select, img {vertical-align:middle}

input, button {margin:0;padding:0;font-family:dotum;font-size:1em}

button {cursor:pointer}


textarea, select {font-family:dotum;font-size:1em}

select {margin:0}

p {margin:0;padding:0;word-break:break-all}

hr {display:none}

pre {overflow-x:scroll;font-size:1.1em}

a:link, a:visited {color:#000;text-decoration:none}

a:hover, a:focus, a:active {color:#000;text-decoration:underline}


/* 팝업레이어 */

#hd_pop {z-index:1000;position:relative;margin:0 auto;width:970px;height:0}

#hd_pop h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}

.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff}

.hd_pops_con {}

.hd_pops_footer {padding:10px 0;background:#000;color:#fff;text-align:right}

.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#393939;color:#fff}


/* 상단 레이아웃 */

#hd {z-index:4;position:relative;min-width:970px;background:#fff}

.hd_zindex {z-index:10 !important}

#hd_h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}

#hd_wrapper {position:relative;margin:0 auto;padding:26px 0;width:970px;zoom:1}

#hd_wrapper:after {display:block;visibility:hidden;clear:both;content:""}


#twitter {float: left; margin-top: 10px; padding:5px 0 0}

#logo {position: relative; left: 200px; padding:5px 0 0}


/* 전체 검색 */

#hd_sch {float:left;margin:0 0 0 20px;padding:0;border:1px solid #c3c6ca}

#hd_sch legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}

#hd_sch #sch_stx {padding-left:5px;width:110px;height:24px;border:0;background:#fff;line-height:1.9em !important;line-height:1.6em}

#hd_sch #sch_submit {padding:0 5px;height:26px;border:0;background:#e2e6eb;color:#333;cursor:pointer}


/* 텍스트 크기 조절 */

#text_size {float:left;margin:0 0 0 10px;letter-spacing:-3px}

#text_size button {margin:0;padding:1px 2px;border:1px solid #c3c6ca;background:transparent;vertical-align:middle;cursor:pointer}

.ts_up {font-size:1.167em !important}

.ts_up2 {font-size:1.3em !important}


/* 상단 회원가입 등 링크 */

#tnb {float:right;margin-top:0;padding:0;list-style:none;zoom:1}

#tnb:after {display:block;visibility:hidden;clear:both;content:""}

#tnb li {float:left;margin:0 0 0 10px}

#tnb a {display:inline-block;padding:0 10px;height:28px;color:#333;letter-spacing:-0.1em;line-height:2.4em}

#tnb a:focus, #tnb a:hover, #tnb a:active {text-decoration:none}

#tnb img {margin-right:3px}


/* 메인메뉴 */

#gnb ul,

#gnb li,

#gnb span,

#gnb a {

  margin: 0;

  padding: 0;

  position: relative;

}

#gnb {

  line-height: 1;

  border-radius: 5px 5px 0 0;

  -moz-border-radius: 5px 5px 0 0;

  -webkit-border-radius: 5px 5px 0 0;

  background: #141414;

  background: -moz-linear-gradient(top, #333333 0%, #141414 100%);

  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #141414));

  background: -webkit-linear-gradient(top, #333333 0%, #141414 100%);

  background: -o-linear-gradient(top, #333333 0%, #141414 100%);

  background: -ms-linear-gradient(top, #333333 0%, #141414 100%);

  background: linear-gradient(to bottom, #333333 0%, #141414 100%);

  border-bottom: 2px solid #0fa1e0;

  width: auto;

}

#gnb:after,

#gnb ul:after {

  content: '';

  display: block;

  clear: both;

}

#gnb a {

  background: #141414;

  background: -moz-linear-gradient(top, #333333 0%, #141414 100%);

  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #141414));

  background: -webkit-linear-gradient(top, #333333 0%, #141414 100%);

  background: -o-linear-gradient(top, #333333 0%, #141414 100%);

  background: -ms-linear-gradient(top, #333333 0%, #141414 100%);

  background: linear-gradient(to bottom, #333333 0%, #141414 100%);

  color: #ffffff;

  display: block;

  font-family: Helvetica, Arial, Verdana, sans-serif;

  padding: 19px 20px;

  text-decoration: none;

}

#gnb ul {

  list-style: none;

}

#gnb > ul > li {

  display: inline-block;

  float: left;

  margin: 0;

}

#gnb.align-center {

  text-align: center;

}

#gnb.align-center > ul > li {

  float: none;

}

#gnb.align-center ul ul {

  text-align: left;

}

#gnb.align-right > ul {

  float: right;

}

#gnb.align-right ul ul {

  text-align: right;

}

#gnb > ul > li > a {

  color: #ffffff;

  font-size: 12px;

}

#gnb > ul > li:hover:after {

  content: '';

  display: block;

  width: 0;

  height: 0;

  position: absolute;

  left: 50%;

  bottom: 0;

  border-left: 10px solid transparent;

  border-right: 10px solid transparent;

  border-bottom: 10px solid #0fa1e0;

  margin-left: -10px;

}

#gnb > ul > li:first-child > a {

  border-radius: 5px 0 0 0;

  -moz-border-radius: 5px 0 0 0;

  -webkit-border-radius: 5px 0 0 0;

}

#gnb.align-right > ul > li:first-child > a,

#gnb.align-center > ul > li:first-child > a {

  border-radius: 0;

  -moz-border-radius: 0;

  -webkit-border-radius: 0;

}

#gnb.align-right > ul > li:last-child > a {

  border-radius: 0 5px 0 0;

  -moz-border-radius: 0 5px 0 0;

  -webkit-border-radius: 0 5px 0 0;

}

#gnb > ul > li.active > a,

#gnb > ul > li:hover > a {

  color: #ffffff;

  box-shadow: inset 0 0 3px #000000;

  -moz-box-shadow: inset 0 0 3px #000000;

  -webkit-box-shadow: inset 0 0 3px #000000;

  background: #070707;

  background: -moz-linear-gradient(top, #262626 0%, #070707 100%);

  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #262626), color-stop(100%, #070707));

  background: -webkit-linear-gradient(top, #262626 0%, #070707 100%);

  background: -o-linear-gradient(top, #262626 0%, #070707 100%);

  background: -ms-linear-gradient(top, #262626 0%, #070707 100%);

  background: linear-gradient(to bottom, #262626 0%, #070707 100%);

}

#gnb .gnb_1dli {

  z-index: 1;

}

#gnb .gnb_1dli:hover > ul {

  display: block;

}

#gnb .gnb_1dli ul {

  display: none;

  position: absolute;

  width: 200px;

  top: 100%;

  left: 0;

}

#gnb.align-right .gnb_1dli ul {

  left: auto;

  right: 0;

}

#gnb .gnb_1dli ul li {

  *margin-bottom: -1px;

}

#gnb .gnb_1dli ul li a {

  background: #0fa1e0;

  border-bottom: 1px dotted #31b7f1;

  font-size: 11px;

  filter: none;

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 125,883 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT