Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<div id="container">
  <div class="item item-1">1</div>
  <div class="item item-2">2</div>
  <div class="item item-3">3</div>
  <div class="item item-4">4</div>
  <div class="item item-5">5</div>
  <div class="item item-6">6</div>
  <div class="item item-7">7</div>
  <div class="item item-8">8</div>
  <div class="item item-9">9</div>
  <div class="item item-7">10</div>
  <div class="item item-8">11</div>
  <div class="item item-9">12</div>
</div>
</body>
</html>
 
body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
    border: 1px solid #e5e4e9;
}
#container{
    border: 1px solid #e5e4e9;
  display: grid;
/*   grid-template-columns: 50px 50px 50px 50px;
  grid-template-rows: auto;
  grid-template-areas: 
    "header header header header"
    "main main . sidebar"
    "footer footer footer footer";  */
 /*  grid-template-rows: 25px 25px 25px 25px 25px;
  grid-template-columns: auto 50px auto;
  grid-template-areas: 
    "header header header" 
    "footer footer footer"; */
  grid-template:  50px  "header header header header" 50px 
    50px  "main main . sidebar" 50px 
    / auto; 
}
.item {
  font-size: 1em;
  text-align: center;
  border: 1px solid #e5e4e9;
}
.item-1 {
  background-color: #ef342a;
  grid-area: header;
}
.item-2 {
  background-color: #f68f26;
  grid-area: main;
}
.item-3 {
  background-color: #4ba946;
  grid-area: sidebar;
}
.item-4 {
  background-color: #0376c2;
  grid-area: footer;
}
Output 300px

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers