<body>
<div id="wrap">
<header id="header">
<div class="container"></div>
</header>
<nav id="nav">
<div class="container"></div>
</nav>
<main id="main">
<div class="contents container">
<div class="left">
<div class="cont1"></div>
</div>
<div class="right">
<div class="cont2"></div>
<div class="cont3"></div>
<div class="cont4"></div>
</div>
</div>
</main>
<footer id="footer">
<div class="container"></div>
</footer>
</div>
</body>
<style>
* {
margin: 0;
}
#wrap {}
#header {
height: 100px;
background-color: #eeebe9;
}
#nav {
height: 100px;
background-color: #b9aaa5;
}
#main {
height: 780px;
background-color: #886f65;
}
#footer {
height: 100px;
background-color: #4e342e;
}
.container {
width: 1200px;
height: inherit;
background-color: rgba(0, 0, 0, 0.3);
margin: 0 auto;
}
.contents {}
.contents .left {}
.contents .left .cont1 {
width: 100%;
height: 100px;
background-color: #74574a;
}
.contents .right {
display: flex;
flex-wrap: wrap;
}
.contents .right .cont2 {
width: 100%;
height: 200px;
background-color: #684d43
}
.contents .right .cont3 {
width: 50%;
height: 480px;
background-color: #594139
}
.contents .right .cont4 {
width: 50%;
height: 480px;
background-color: #4A352F
}
@media (max-width: 1220px) {
.container {
width: 96%;
}
.contents {
display: flex;
}
.contents .left {
width: 30%;
}
.contents .left .cont1 {
width: 100%;
height: 780px;
background-color: #74574a;
}
.contents .right {
width: 70%;
}
.contents .right .cont2 {
width: 100%;
height: 390px;
background-color: #684d43
}
.contents .right .cont3 {
width: 50%;
height: 390px;
background-color: #594139
}
.contents .right .cont4 {
width: 50%;
height: 390px;
background-color: #4A352F
}
}
@media (max-width: 768px) {
.container {
width: 100%;
}
.contents .right .cont2 {
width: 100%;
height: 260px;
}
.contents .right .cont3 {
width: 100%;
height: 260px;
}
.contents .right .cont4 {
width: 100%;
height: 260px;
}
}
@media (max-width: 480px) {
.contents {
display: flex;
flex-wrap: wrap; /*flex 사용시 width값 height값을 알기위한 용도*/
}
.contents .left {
width: 100%;
height: 150px;
}
.contents .left .cont1 {
height: 150px;
}
.contents .right {
width: 100%;
height: 630px;
}
.contents .right .cont2 {
height: 210px;
}
.contents .right .cont3 {
height: 210px;
}
.contents .right .cont4 {
height: 210px;
}
}
</style>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.