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

css 드롭다운메뉴가 안내려와요 ㅜㅜ

초보자코딩00 4년 전 조회 5,496

 

    

        

            

                

                

                        

                            로그인

                        

                        

                            이용권

                        

                        

                            이벤트

                        

                    

            

        

           

            

            

                

                

                

                    search

                

            

            

                

                

                

                    

                

                

                    

                        

                            

                                

                                    

                                

                            

                            

                                

                                    카테고리

                                    

                                    

                                        

                                    

                                       

                            

                            

                                

                                    LIVE

                                

                            

                            

                                

                                    MY

                                

                            

                        

                    

                        

            

             

        

 

 

body {

    font-family: 'Noto Sans KR', sans-serif;

    font-size: 16px;

    font-weight: 400;

    line-height: 1.4;

    background:#1b1b1b;    

    height: 3000px;

}

 

.wrapper {

    width: 1100px;

    margin: 0 auto;

    position: relative;

}

 

img {

    display: block;

    padding-left: 144px;

}

 

a {

    text-decoration: non;

}

 

/* HEADER */

 

header>.wrapper {

    background: #1b1b1b;

    height: 34px;

    width: 100%;

    justify-content: space-between;

    display: flex;

    flex-direction: column;

    position: fixed;

}

 

header>.wrapper {

    display: flex;

    flex-direction: column;

}

 

header .header--tertiary>ul {

    color: #a5a5a5;

}

 

header .header--tertiary {

    position: absolute;

    top: 0;

    width: 100%;

    height: 34px;

    border-bottom: 1px solid #2c2c2e;

    box-sizing:border-box;

    font-size: 12px;

    display: flex;

}

 

header .header--tertiary>ul {

    position:absolute;

    top: 0;

    bottom: 2px;

    right: 123px;

    margin: auto 0;

    display: flex;

    align-items: center;

}

 

header .header--tertiary>ul li {

    float: left;

    margin-left: 12px;

    margin-right: 12px;

}

 

header .header--tertiary>ul li.log-in {

    display: flex;

    align-items: flex-end;

    cursor: pointer;

}

 

header .header--tertiary>ul li.use {

    display: flex;

    align-items: flex-end;

    cursor: pointer;

}

 

header .header--tertiary>ul li.event {

    display: flex;

    align-items: flex-end;

    cursor: pointer;    

}

 

header .main {

    position: relative;

}

 

header .logo {

    display: block;

    position:inherit;

    top: 0;

    bottom: 0;

    left: 0;

    margin: auto ;

    position: absolute;

}

 

header .logo img {

    width: 111px;

    height: 20px;

    top: 141px;

    bottom: 0;

    margin: auto 0;

    position: absolute;

}

 

header .header--second {

    background:#1b1b1b;

    height: 108px;

    width: 100%;

    justify-content: space-between;

    display: flex;

    flex-direction: column;

}

 

header .menu {

    position: absolute;

    top: 57.5px;

    left: 20.9%;

    padding-right:40px;

    width: calc(100% - 100px);

    display: flex;

    flex-direction: column;

    box-sizing: border-box;

}

 

header .menu .header--secondary ul.main .item__name {

    display: block;

    padding: 20px;

    font-size: 20px;

}

 

header .menu .header--secondary ul.main .item_name {

    display: block;

    padding: 20px;

    font-size: 20px;

    color: white;

}

 

header .menu .header--secondary ul.main .item_name:hover {

    cursor: pointer;

}

 

header .menu .header--secondary ul.main .item___name {

    display: block;

    padding: 20px;

    font-size: 20px;

    

}

 

header .menu .header--secondary ul.main .item___name:hover {

    cursor: pointer;

    color: white;

}

 

header .search-box {

    position: absolute;

    display: inline-block;

    flex-direction: column;

    box-sizing: border-box;

    height: 40px;

    border-radius: 40px;

    top: 5.4%;

    right: -2%;

    padding: 20px;

}

 

.material-icons {

    color: #A5A5A5;

    float: left;

    width: 40px;

    height: 25px;

    font-size: 28px;

    display: flex;

    justify-content: center;

    align-items: center;

    cursor: pointer;

}

 

.search-txt {

    border: none;

    background: #1b1b1b;

    outline: none;

    padding: 0;

    font-size: 17.5px;

    /* transition: .4s; */

    line-height: 27px;

    font-weight:normal;

}

 

header .menu .header--secondary {

    position: relative;

    color: #a5a5a5;

    height: 25px;

    display: flex;

    font-size: 13px;

    align-items: center;

}

 

header .menu .header--secondary ul.main {

    float: left;

    transition: .4s;

    height: 25px;

    padding: 0 5px;

    display: flex;

    align-items: center;

}

 

header .menu .header--secondary ul.main li.menu .item__title .item__name {

    top: 50px;

}

 

header .menu .header--secondary ul.main .item__name:hover {

    color: #F6F5F0;

    transition: .4s;

    cursor: pointer;

}

<이부분에 드롭다운메뉴했는데 안내려와요ㅜㅜ>

header .menu .header--secondary ul.main .item__contents {

    display: none;

}

 

header .menu .header--secondary ul.main li.item___name:hover .item__contents {

    display: block;

}

 

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

답변 1개

s
sinbi Expert
4년 전

두 요소가 대등하게 있는데, CSS는 자손처럼 정의해서 그렇네요.

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

답변에 대한 댓글 3개

초보자코딩00
4년 전
그럼 혹시 어떻게 수정해야할까요?ㅠㅠ
s
sinbi
4년 전
현재 구조가 아래와 같습니다.

<li class="main">
<div class="item__title">
<div class="item___name">카테고리</div>
<div class="item__contents">

님이 짠 게 작동하라면,
<div class="item__contents"> 내용이 카테고리 글자 바로 뒤로 가야 합니다.
초보자코딩00
4년 전
알려주셔서 감사합니다!!

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

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

로그인