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

메뉴레이어가 board에 가려집니다 채택완료

고기조아 10년 전 조회 3,404

그누메뉴대신 임의로 메뉴를 만들어서 head.php에 include했는데

index.php에서는 잘 나타나는데 게시판에 들어가면 게시판 몸체에 가려집니다.

z-index를 어디에 줘야 할까요?

그누메뉴에서는 z-index를 999로 지정해고 있네요.

 

[레이어 css]

      body, div, ul, li{margin:0; padding:0}

 body{font-size:12px; font-family:"맑은 고딕", arial}

 ul{list-style:none}  a{color:#ecf1f7; text-decoration:none}

    .gnb{     width:640px; height:55px; margin:auto; margin-top:10px;  }

    /* 메인메뉴 영역 */     .gnb>ul{    width:640px; height:30px; background:#ecf1f7;//배경색    padding:20px 0 0 20px;  }

 .gnb>ul>li{    float:left; width:150px; height:30px; margin-right:5px;    position:relative;  }

 .gnb>ul>li>a{    display:block; width:100%; height:100%;    font:bold 13px/30px "맑은 고딕", arial;    text-align:center; color:#000; background:#ecf1f7;  }

 .gnb ul li a:hover{text-decoration:none; color:#fff; background:#3d3d3d}

    /* 서브메뉴 영역*/     .gnb ul ul{display:none}

 .gnb>ul>li:hover ul{     display:block; width:150px; height:25px;     position:absolute; left:0; top:30px;  }

 .gnb li li{width:150px; height:25px; background-color:#3d3d3d; text-align:center;}

    .gnb li li a{    display:block; width:100%; height:100%;    font:bold 12px/25px "맑은 고딕", arial;    text-align:center; color:#fff; background:#3d3d3d;  }

    .gnb li li a:hover{    color:white; background:none;  }     ​ 

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

답변 2개

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

.gnb 에 넣으면 되지 않을까 합니다.

position:relative; 도 넣어야 하구요.

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

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

10년 전

답변 감사합니다.

도저히 안되서 그누 자체 default.css의 스타일을 각 ul과 li에 적용해서 해결했습니다. 

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

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

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

로그인