Responsive layout using CSS Grid
<html>
<head>
<title>CSS Grid Sample</title>
<style>
.container
{
margin: 0 auto;
width: 100%;
height: 100%;
display: grid;
grid-template-columns: 150px 150px 150px;
grid-template-rows: 200px 200px 200px;
}
.entry
{
color: white;
text-align: center;
display: table-cell;
vertical-align: middle;
}
#first { background-color: red; }
#second { background-color: green; }
#third { background-color: blue; }
#fourth { background-color: teal; }
#fifth { background-color: grey; }
#sixth { background-color: brown; }
#seventh { background-color: silver; }
#eighth { background-color: maroon; }
#ninth { background-color: cyan; }
</style>
</head>
<body>
<div class="container">
<div class="entry" id="first">1st</div>
<div class="entry" id="second">2nd</div>
<div class="entry" id="third">3rd</div>
<div class="entry" id="fourth">4th</div>
<div class="entry" id="fifth">5th</div>
<div class="entry" id="sixth">6th</div>
<div class="entry" id="seventh">7th</div>
<div class="entry" id="eighth">8th</div>
<div class="entry" id="ninth">9th</div>
</div>
</body>
</html>





Last updated