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 class="container">
    
    <div class="box1">A</div>
    <div class="box2">B</div>
    <div class="box3">C</div>
    <div class="box4">D</div>
    
  </div>
</body>
</html>
 
.container {
  width: 100%;
  height: 400px;
  outline: 2px solid red;
  display: grid;
  
  grid-template-rows: repeat(8, 1fr);
  grid-template-columns: repeat(8, 1fr);
}
.container{
  font-size: 50px;
}
.box1 {
  grid-row: 1/3;
  grid-column: 1/3;
  background-color: #faa;
}
.box2 {
  grid-row: 3/5;
  grid-column: 3/5;
  background-color: #afa;
}
.box3 {
  grid-row: 5/7;
  grid-column: 5/7;
  background-color: #aaf;
}
.box4 {
  grid-row: 7/9;
  grid-column: 7/9;
  background-color: #8f8;
}
Output

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