corsonr
1/3/2018 - 12:36 PM

Basic grid layout

Basic grid layout

body {
  margin: 0;
}
#page {
  display: grid;
  width: 100%;
  height: 200px;
  grid-template: [header-left] "head head" 100px [header-right]
                 [intro-left]   "intro  intro" 490px  [intro-right]
                 [main-left]   "main  main" 1fr  [main-right]
                 [footer-left] "foot  foot" 30px [footer-right]
                 / 120px 1fr;
}

header {
  width: 1020px;
  justify-self: center;
  background-color: lime;
  grid-area: head;
}

#intro {
  width: 100%;
  background-color: blue;
  grid-column: intro;
}

main {
  width: 1020px;
  justify-self: center;
  background-color: yellow;
  grid-area: main;
}

footer {
  width: 1020px;
  justify-self: center;
  background-color: red;
  grid-column: foot;
}
<html>
  <header>
    <link rel='stylesheet' id='style-css'  href='style.css' type='text/css' media='all' />
  </header>
  
  <body>
    <section id="page">
      <header>Header</header>
      <section id="intro">Intro</section>
      <main>Main section</main>
      <footer>Footer</footer>
    </section>
  </body>
</html>