Seeking guidance on how to symmetrically center an image gallery with a list background, regardless of the browser's size. Any tips for aligning content perfectly?
I attempted using a wrapper around the gallery and list with a fixed width, but it only altered the image size, not the background list. I also experimented with floating elements, which caused everything to shift.
.months {
display: inline-block;
text-align: justify;
color: #808080;
width: 44.4%;
margin-top: 25px;
}
.months ul {
list-style-type: none;
}
.months li {
background-color: #ffffff;
padding: 16px;
border-bottom: 1px solid #808080;
}
.tourCities {
display: inline-block;
width: 260px;
margin: 15px;
background-color: #ffffff;
}
.tourCities img {
width: 100%;
height: auto;
}
Included a jsfiddle link for reference.
https://i.sstatic.net/BOEHw.jpg This is my desired outcome https://i.sstatic.net/8yMTE.jpg Unfortunately, this is what I end up with, and it just doesn't look right – impacts my OCD.