-
카테고리
-
세부 분야
자격증 (디자인)
-
해결 여부
미해결
선생님 ㅜ 아무리 해도 페밀리 사이트 보더가 안뜹니다ㅠㅠ
21.04.15 02:36 작성 조회수 62
1
똑같이 따라했는데도 자꾸 안떠요ㅠ 어떻게 해야할까요
<div class="container">
<div class="header-inner">
<header>
<div class="header-logo"></div>
<div class="navi"></div>
</header>
</div>
<div class="content-inner">
<div class="slide">
<div></div>
</div>
<div class="items">
<div class="news"></div>
<div class="gallery"></div>
<div class="banner"></div>
</div>
</div>
<div class="footer-inner">
<footer>
<div class="copyright">
<div></div>
<div></div>
<div class="family-site"></div>
</div>
</footer>
</div>
</div>
@charset 'utf-8';
body {
margin: 0;
background-color: #fff;
color: #222328;
font-size: 15px;
}
a {
color: #222328;
text-decoration: none;
}
.container {}
.header-inner {
border: 1px solid black;
background-color: #eee;
}
header {
height: 100px;
width: 1200px;
margin: auto;
}
header > div {
height: 100px;
}
.header-logo {
background-color: #333;
width: 200px;
float: left;
}
.navi {
background-color: #333;
width: 600px;
float: right;
}
.content-inner {}
.slide {
width: 1200px;
margin: auto;
height: 300px;
background-color: #ccc;
}
.slide > div {}
.items {
width: 1200px;
margin: auto;
}
.items > div {
height: 200px;
float: left;
}
.news {
width: 500px;
background-color: #bbb;
}
.gallery {
width: 350px;
background-color: #666;
}
.banner {
width: 350px;
background-color: #888;
}
.footer-inner {
background-color: #eee;
clear: both;
}
footer {
width: 1200px;
margin: auto;
overflow: hidden;
}
footer > div {
height: 100px;
float: left;
}
.copyright {
width: 1000px;
background-color: #777;
}
.copyright div {
/* border: 1px solid #fff;*/
height: 50px;
}
.family-site {
width: 200px;
background-color: #000;
}
답변을 작성해보세요.
0
코딩웍스(Coding Works)
지식공유자2021.04.15
html 구조를 강의처럼 안하시고 어렵게 만드시고 있습니다.
아래처럼 만드셨는데 footer 다음에 .copyright는 필요없어요.
불필요한 구조가 생기면 관리하기가 힘들어지고 힘들어지면 곧 실수하게 되잖아요.
그리고 클래스명을 안주시는데 나중에 실수하실 수 있어요.
강의에 있는 html 보시면 맨 밑에 있는 것처럼 해주시는게 좋습니다.
<div class="footer-inner">
<footer>
<div class="footer-logo"></div>
<div class="copyright"></div>
<div class="family-site"></div>
</footer>
</div>
=================================
.footer-inner {
background-color: #eee;
clear: both;
}
footer {
width: 1200px;
margin: auto;
overflow: hidden;
}
footer > div {
height: 100px;
float: left;
}
.footer-logo {
width: 200px;
background-color: blue;
}
.copyright {
width: 800px;
background-color: #777;
}
.family-site {
width: 200px;
background-color: pink;
}
답변 1