• 카테고리

    질문 & 답변
  • 세부 분야

    자격증 (디자인)

  • 해결 여부

    해결됨

네비게이션 상단 3번 제작 중 오류가 있는 것 같아요 ㅠㅠ

23.05.22 15:34 작성 조회수 206

2

안녕하세요

강사님이 만들어 두신 네비게이션 최종본 파일을 지우고 새로 적으면서

강의를 듣고 따라해보고 있는데

분명 똑같이 했는데 메뉴부분이 보더가 부족해서 왜 이런가 싶어서 문의드립니다 ㅠㅠ

어떤게 잘못된건지 계속 찾아봐도 모르겠네요...

네비게이션 오류.PNG

답변 2

·

답변을 작성해보세요.

0

네비게이션 오류까지는 아니구요.

.sub-menu에 높이를 적당히 주시면 됩니다.

image

image

혜민님의 프로필

혜민

질문자

2023.05.22

아 바로 해결 되었습니다^^ 감사합니다!!!!!!!!!

0

html, css, js 전체코드 복사해서 올려주세요.

혜민님의 프로필

혜민

질문자

2023.05.22

<!DOCTYPE html>
<html lang="ko">

<head>
    <meta charset="UTF-8">
    <title>네비게이션-상단-03-개별(완성)</title>
    <link rel="stylesheet" href="css/style.css">
</head>

<body>

    <div class="container">
        <div class="header-inner">
            <header>
                <div class="header-logo">로고</div>
                <div class="navi">
                    <!-- Navigation -->
                    <ul class="menu">
                        <li>
                            <a href="#none">MENU-1</a>
                            <div class="sub-menu">
                                <a href="#none">SUBE-MENU-1</a>
                                <a href="#none">SUBE-MENU-2</a>
                                <a href="#none">SUBE-MENU-3</a>
                                <a href="#none">SUBE-MENU-4</a>
                            </div>
                        </li>
                        <li>
                            <a href="#none">MENU-2</a>
                            <div class="sub-menu">
                                <a href="#none">SUBE-MENU-1</a>
                                <a href="#none">SUBE-MENU-2</a>
                                <a href="#none">SUBE-MENU-3</a>
                                <a href="#none">SUBE-MENU-4</a>
                            </div>
                        </li>
                        <li>
                            <a href="#none">MENU-3</a>
                            <div class="sub-menu">
                                <a href="#none">SUBE-MENU-1</a>
                                <a href="#none">SUBE-MENU-2</a>
                                <a href="#none">SUBE-MENU-3</a>
                                <a href="#none">SUBE-MENU-4</a>
                            </div>
                        </li>
                        <li>
                            <a href="#none">MENU-4</a>
                            <div class="sub-menu">
                                <a href="#none">SUBE-MENU-1</a>
                                <a href="#none">SUBE-MENU-2</a>
                                <a href="#none">SUBE-MENU-3</a>
                                <a href="#none">SUBE-MENU-4</a>
                            </div>
                        </li>
                    </ul>
                    <!-- Navigation -->
                </div>
            </header>
        </div>
        <div class="content-inner">
            <section class="slide">
                <div>이미지 슬라이드</div>
            </section>
            <section class="items">
                <div class="news">공지사항(C.1)</div>
                <div class="banner">갤러리(C.2)</div>
                <div class="shortcut">바로가기(C.3)</div>
            </section>
        </div>
        <div class="footer-inner">
            <footer>
                <div class="footer-logo">Copyright</div>
                <div class="footer-content">
                    <div>SNS</div>
                    <div>패밀리 사이트</div>
                </div>
            </footer>
        </div>
    </div>

    <script type="text/javascript" src="script/jquery-1.12.4.js"></script>
    <script type="text/javascript" src="script/custom.js"></script>

</body>

</html>
혜민님의 프로필

혜민

질문자

2023.05.22

@charset "utf-8";

body {
    margin: 0;
    font-size: 15px;
    color: #222;
    line-height: 1.6em;
    background-color: #fff;
}
a {
    text-decoration: none;
    color: #222;
}
.container {}

/* Header */
.header-inner {
    background-color: #eee;
}
header {
    border: 1px solid #ccc;
    width: 1200px;
    margin: auto;
    height: 100px;
}
header div {
    height: 100px;
    border: 1px solid #ccc;
}
.header-logo {
    width: 200px;
    float: left;
    text-align: center;
    line-height: 100px;
}
.navi {
    /* width: 600px; */
    /* float: right; */
}

/* Content */
.content-inner {
    width: 1200px;
    margin: auto;
}
.slide {
    width: 1200px;
    height: 300px;
    text-align: center;
    line-height: 300px;
}
.slide div {
    border: 1px solid #ccc;
    height: 300px;
}

.items {
    overflow: hidden;
}
.items > div {
    border: 1px solid #ccc;
    height: 200px;
    float: left;
    box-sizing: border-box;
}
.news {
    width: 500px;
    text-align: center;
    line-height: 200px;
}
.banner {
    width: 350px;
    text-align: center;
    line-height: 200px;
}
.shortcut {
    width: 350px;
    text-align: center;
    line-height: 200px;
}

/* Footer */
.footer-inner {
    background-color: #eee;
}
footer {
    width: 1200px;
    margin: auto;
    overflow: hidden;
}
footer > div {
    border: 1px solid #ccc;
    height: 100px;
    float: left;
    box-sizing: border-box;
}
.footer-logo {
    width: 1000px;
    text-align: center;
    line-height: 100px;
}
.footer-content {
    width: 200px;
    text-align: center;
    line-height: 100px;
}
.footer-content div {
    border: 1px solid #ccc;
    height: 50px;
    text-align: center;
    line-height: 50px;
}

/* Navigation */
.menu {
    list-style: none;
    padding: 0;
}
.menu li {
    float: left;
    width: 150px;
    box-sizing: border-box;
    text-align: center;
}
.menu li > a {
    border: 1px solid #000;
    display: block;
    padding: 5px;
}
.sub-menu {
    border: 1px solid #000;
    background-color: #fff;
}
.sub-menu a {
    display: block;
    padding: 5px;
}

혜민님의 프로필

혜민

질문자

2023.05.22

제이쿼리는 전부 지워서 코드가 없습니다!