• 카테고리

    질문 & 답변
  • 세부 분야

    자격증 (디자인)

  • 해결 여부

    해결됨

왜 sns가 오른쪽으로 안가고 밑으로 쳐지는지 모르겠어요

21.08.23 01:31 작성 조회수 122

1

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>부여 가을연꽃축제</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <div class="container">
         <div class="left">
              <header>
                  <div class="header-logo"></div><!--.header-logo-->
                  <div class="navi"></div><!--.navi-->
              </header>
         </div><!--.left-->
         <div class="right">
              <div class="slide">
                   <div></div>
              </div><!--.slide-->
              <div class="items">
                   <div class="news"></div><!--.news-->
                   <div class="gallery"></div><!--.gallery-->
                   <div class="shortcut"></div><!--.shortcut-->
              </div><!--.items-->
              <footer>
                <div class="copyright">

                </div><!--.copyright-->
                <div class="sns">
                     <div></div>
                     <div></div>
                </div><!--.sns-->
              </footer>
         </div><!--.right-->
    </div>
    <script src="script/jquery-1.12.4.js"></script>
    <script src="script/custom.js"></script>
    
</body>
</html>
@charset 'utf-8';
*{
    padding0;
    list-stylenone;
    text-decorationnone;
}
body{
    margin:0;
    background-color#fff;
    color:#222328;
    font-size15px;
}
.container{
   border1px solid red;
   width:1000px;
  
}
.container > div{
    border1px solid blue;
    floatleft;
    box-sizingborder-box
}
.left{
    width:200px;
}
.right{
    width:800px;
}
header{
     
}
header > div{}
.header-logo{
    border1px solid green;
    height100px;
}
.navi{
    border1px solid red;
    height400px;
}

.slide{}
.slide > div{
    border1px solid green;
    height350px;
}

.items{
    overflowhidden;
}
.items > div{
    border1px solid pink;
    height200px;
    floatleft;
    box-sizingborder-box;
}
.news{
    width400px;
}
.gallery{
    width250px;
}
.shortcut{
    width250px;
}

footer{
    overflowhidden;
}
footer > div{
    border1px solid blue;
    height100px;
    float:left;
    box-sizingborder-box;
}
.copyright{
   width:600px;
}
.sns{
    width:200px;
}
.sns div{
    border1px solid #000;
    height50px;
    }

답변 1

답변을 작성해보세요.

1

C타입하실 때 주의하실 부분인데 아래에 굵은 글씨로 된 보더를 삭제하시면 됩니다.

이유는 . right라는 div가 왼쪽 오른쪽 1픽셀의 보도를 갖고 있어서 들어갈 수 있는 공간이 798 픽셀 밖에 안되기 때문에 내부에 800 픽셀이 못 들어가는 거예요.

와이어 프레임 제작 후 어차피 보더는 삭제할 거니까 아래 굵은 글씨 보도 삭제하시면 다 가로배치 정상적으로 됩니다.

.container > div{

    border: 1px solid blue;

    float: left;

    box-sizing: border-box; 

}

감사합니다 해결이 되었네요!