<body>
    <div id="wrap">
        <div id="header"></div>
        <div id="nav"></div>
        <div id="main">
            <div id="aside"></div>
            <div id="section">
              <div class="box1"></div>
              <div class="box2"></div>
            </div>
            <div id="article"></div>
        </div>
        <div id="footer"></div>
    </div>
  
</body>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>레이아웃 02</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            background-color: #E8F5E9;
        }
        #wrap {
            width: 1200px;
            margin: 0 auto;
        }
        #header {
            width: 100%;
            height: 100px;
            background-color: #C8E6C9;
        }
        #nav {
            width: 100%;
            height: 100px;
            background-color: #A5D6A7;
        }
        #main {
            width:  100%;
            overflow: hidden;   /* 부모박스에게 주는 방식 */
        }
        #aside {
            width: 30%;
            height: 780px;
            background-color: #81C784;
            float: left; 
        }
        #section {
            width: 40%;
            height: 780px;
            background-color: #66BB6A;
            float: left;
        }
.box1 {
  height: 390px;
  background-color: #62bd66;
}
.box2 {
  height: 390px;
  background-color: #a4c1a6;
}
        #article {
            width:  30%;
            height: 780px;
            background-color: #4CAF50;
            float: left;
        }
        #footer {
            width:  100%;
            height: 100px;
            background-color: #43A047;
        }

        /*미디어 쿼리*/
        @media (max-width:1300px){
            #wrap {
                width: 96%;
            }
        }
        @media (max-width :768px) { 
            #wrap {
                width: 100%;
            }
            #aside {
                width: 30%;
                height: 630px;
            }
            #section {
                width: 70%;
                height: 630px;
            }
            #article {
                width: 100%;
                height: 150px;
            }
        }
        @media (max-width :480px) { 
            #aside {
                width: 100%;
                height: 200px;
            }
            #section {
                width: 100%;
                height: 430px;
            }
            #article {
                width: 100%;
                height: 150px;
            }
        }    
    </style>
</head>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.