Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style> 
#container {
  width: 100%;
  aspect-ratio: 1;
  margin: 10px 0;
  border: solid black 1px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  place-items: start;
}
#container > div {
  padding: 20%;
  margin: 2px;
}
.normal {
  background-color: lightblue;
}
#myDiv {
  background-color: coral;
}
</style>
</head>
<body>
<h1>Change place-self property with JavaScript</h1>
<p>Click the "Try it" button to change the place-self value of the orange grid item:</p>
<button onclick="myFunction()">Try it</button>
<div id="container">
  <div class="normal"></div>
  <div class="normal"></div>
  <div class="normal"></div>
  <div class="normal"></div>
  <div class="normal"></div>