테스트 사이트 - 개발 중인 베타 버전입니다

pc메뉴와 모바일 메뉴 순서가 반대로 나타나요 채택완료

배추언니 10년 전 조회 2,669

메뉴부분아마자 

 

head부분

</strong></p><p><strong>    <nav id="gnb">
        <h2>메인메뉴</h2>
        <ul id="gnb_1dul">
        <div class="logo">
         <a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.jpg" alt="<?php echo $config['cf_title']; ?>"></a>
        </div>
        
         
              <?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 = 999; // gnb_1dli z-index 값 설정용</strong></p><p><strong>            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']; ?>" class="gnb_1da"><?php echo $row['me_name'] ?></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);</strong></p><p><strong>                for ($k=0; $row2=sql_fetch_array($result2); $k++) {
                    if($k == 0)
                        echo '<ul class="gnb_2dul">'.PHP_EOL;
                ?>
                    <li class="gnb_2dli"><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" class="gnb_2da"><?php echo $row2['me_name'] ?></a></li>
                <?php
                }</strong></p><p><strong>                if($k > 0)
                    echo '</ul>'.PHP_EOL;
                ?>
            </li>
            <?php
            }</strong></p><p><strong>            if ($i == 0) {  ?>
                <li id="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> 
<a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 &gt; 환경설정 &gt; 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
            <?php } ?>
       
       
       
        
        </ul>
    </nav></strong></p><p><strong>

 

css부분

</strong></p><p><strong>#gnb {position:relative; margin:-1px 0 0;border-bottom:1px solid #dde4e9; width:100%; float:left; }
#gnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}</strong></p><p><strong>#gnb_1dul {margin:0 auto !important;padding:0;zoom:1; position:relative; width:1000px; }
.logo {position:absolute; float:left; padding-top:24px; z-index:30; }</strong></p><p><strong>#gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}</strong></p><p><strong>.gnb_1dli {z-index:10;position:relative; float:right; top:1px; right:0; border-bottom:1px solid  #dde4e9; box-sizing:border-box; }</strong></p><p><strong>.gnb_1da { display:inline-block;padding:0 20px 0 20px; height:80px;background: url('../img/bar1x11.gif') center right no-repeat; font-size:15px; font-weight:bold;line-height:5.2em;text-decoration:none; }</strong></p><p><strong>.gnb_1da:focus, .gnb_1da:hover {background:url('../img/bar1x11.gif') center right no-repeat;text-decoration:none}</strong></p><p><strong>.gnb_1dli_air .gnb_1da {background-color:#333;color:#fff}
.gnb_1dli_on .gnb_1da {background-color:#FFF; color:#09F; }</strong></p><p><strong>.gnb_2dul {display:none;width:100%; position:absolute; top:81px;}
.gnb_2da {display:block;padding:9px 10px;text-align:center;text-decoration:none ; font-size:12px; border-bottom:1px solid #999;}</strong></p><p><strong>.gnb_1dli_air .gnb_2da {background-color:#333;color:#fff}
.gnb_1dli_on .gnb_2da {background-color:rgba(14,43,75,0.8);color:#fff}
.gnb_2da:focus, .gnb_2da:hover {background:#0e2b4b;text-decoration:none; font-weight:bold;}
.gnb_1dli_over .gnb_2dul {display:block;left:0;}
.gnb_1dli_over2 .gnb_2dul {display:block;right:0;}</strong></p><p><strong>#gnb_empty {padding:10px 0;width:100%;text-align:center;line-height:2em}
#gnb_empty a {text-decoration:underline}


관리자모드메뉴설정



모바일페이지



제목대로 피씨와 모바일메뉴가 반대로 나타나요 ㅜㅜ 도와주세요 고수님들

 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
y
10년 전

.gnb_1dli {z-index:10;position:relative; float:right; ... 

.gnb_1dli {z-index:10;position:relative; float:left; ... 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

배추언니
10년 전
저렇게 고치면 로고와 겹쳐서 왼쪽정렬되요.......
달콤별
10년 전
<ul id="gnb_1dul">
<div class="logo">
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.jpg" alt="<?php echo $config['cf_title']; ?>"></a>
</div>



<div class="logo">
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.jpg" alt="<?php echo $config['cf_title']; ?>"></a>
</div>
<ul id="gnb_1dul">

로 빼세요.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인