<div id="wrap">
<div id="header"></div>
<div id="nav"></div>
<div id="box">
<div id="aside"></div>
<div id="section"></div>
</div>
<div id="footer"></div>
</div>
* {
margin: 0;
padding: 0;
}
body {
background-color: #FFF3E0;
}
#wrap {
width: 1200px;
margin: 0 auto; /* 블록구조를 가운데 정렬 */
}
#header {
height : 100px;
background-color: #FFE0B2;
}
#nav {
height : 100px;
background-color: #FFCC80;
}
#box {
display: grid;
grid-template-areas:
"aside section"
"aside section"
;
grid-template-columns: 30% 70%;
grid-template-rows: 780px 780px;
}
#aside {
grid-area: aside;
background-color: #FFB74D;
}
#section {
grid-area: section;
background-color: #FFA726;
}
#footer {
height: 100px;
background-color: #FF9800;
}
@media(max-width: 1220px){
#wrap {
width: 96%;
}
}
@media(max-width: 768px){
#wrap {
width: 100%;
}
}
@media(max-width: 480px){
#wrap {
width: 100%;
}
#box {
display: grid;
grid-template-areas:
"aside"
"section"
;
grid-template-columns: 100%;
grid-template-rows: 300px 480px;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.