fixedlayout

by rootjang

HTML

<!DOCTYPE html>
<html lang="ko-KR">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>고정 그리드 레이아웃</title>
  <style>
    #wrapper {
      width: 960px;
      margin: 0 auto; /* 가운데 정렬 */
    }

    header {
      width: 960px;
      height: 120px;
      background: #066cfa;
      border-bottom: 1px solid black;
    }

    .header-text {
      font-size: 40px;
      color: white;
      text-align: center;
      line-height: 120px;
    }

    .content {
      float: left;
      width: 600px;
      height: 400px;
      padding: 15px;
      background: #ffd800;
    }

    .right-side {
      float: right;
      width: 300px;
      height: 400px;
      padding: 15px;
      background: #00ff90;
    }

    footer {
      clear: both;
      height: 120px;
      background-color: #c3590a;
    }
  </style>
</head>
<body>
  <div id="wrapper">
    <header>
      <h1 class="header-text">고정 그리드 레이아웃</h1>
    </header>
    <section class="content">
      <h4>본문은 section</h4>
    </section>
    <aside class="right-side">
      <h4>사이드바</h4>
    </aside>
    <footer>
      <h4>푸터</h4>
    </footer>
  </div>
</body>
</html>