Right now I have a grid full of images that are entirely different sizes. I want to have each of the images round up to a certain size, and so far all I have been able to do is use percentages for it to work.
Is there a way to make the images always stay a certain size?
<div class="grid-container">
<div class="item">
<a href="Games/exmpgame/index.html" target="_blank" rel="noopener noreferrer">
<img src="Images/car_racing.jpg" alt="Failed to load" width="100%" height="70%" title="Game!">
</a>
<h3 class="caption">Example thingy</h3>
<p>This is a cool bit <br>
of text and stuff!</p>
</div>
</div>
Here is the CSS for creating a grid:
.column {
float: left;
width: 33.33%;
padding: 5px;
display: inline-block ;
max-height: 200px;
}
.row::after {
content: "";
clear: both;
display: table;
}
@media screen and (max-width: 500px) {
.column {
width: 90%;
}
}
.grid-container {
display: grid;
column-gap: 50px;
row-gap: 50px;
grid-template-columns: auto auto auto;
grid-template-rows: auto auto auto auto;
align-content: center;
max-width: 66%;
margin: auto auto;
}