Here is the code snippet:
.grid-container {
display: grid;
grid-template-columns: auto auto auto;
background-color: #2196F3;
padding: 10px;
}
.grid-item {
background-color: rgba(255, 255, 255, 0.8);
border: 1px solid rgba(0, 0, 0, 0.8);
padding: 20px;
font-size: 30px;
text-align: center;
}
<div class="grid-container">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
<div class="grid-item">5</div>
<div class="grid-item">6</div>
<div class="grid-item">7</div>
<div class="grid-item">8</div>
<div class="grid-item">9</div>
</div>
You can view and interact with this code on
https://www.w3schools.com/css/tryit.asp?filename=trycss_grid
Is it possible to adjust the styling of one of the div elements or utilize another method to vertically offset one of the numbers by 15 pixels?
Specifically, how can we vertically offset the number 5 in the center cell by 15 pixels?
(I have included a mock-up image as a reference if it loads correctly).
Thank you.