I am designing my website's homepage and I want to showcase 12 equally sized pictures in a 3 by 4 grid layout. I prefer not to use tables because my CSS has media queries that adjust the layout based on screen size. However, if there is a way to achieve the same with tables, I am open to it. The challenge I am facing is when I only have 11 pictures, the last one appears off-centered.
Below is the code for the first 3 divs (the rest follow a similar structure):
.divThumb1{
float: left;
width: 31%;
max-width: 288px;
margin: 0%;
position: relative;
margin-top: 15px;
}
.divThumb2{
margin:0 auto;
display:inline-block;
width: 31%;
max-width: 288px;
margin: 0%;
position: relative;
margin-top: 15px;
}
.divThumb3{
float: right;
width: 31%;
max-width: 288px;
margin: 0%;
position: relative;
margin-top: 15px;
}
If you have any suggestions or need more information, please feel free to reach out!