Struggling with a HTML/CSS challenge here! I'm attempting to vertically align 3 images and text in the pattern of image, text, image, text, image, text. Everything looks great on my 13" MacBook, but once I start resizing the window, chaos ensues. Any tips on making this formatting responsive to screen size?
P.S. Managed to get it working for mobile though.
This is my code:
.checklogostyle {
vertical-align: middle;
margin-top: 10px;
padding-left:13%;
float:left;
}
@media (max-width:768px) {
.checklogostyle {
vertical-align: middle;
margin-top: 30px;
margin-left:20px;
margin-right: 20px;
float:left;
}
}
.brandstext {
padding-left:12%;
float:left;
text-align:left;
}
@media (max-width:768px) {
.brandstext {
margin-left:0px;
margin-top:20px;
float:center;
text-align:left;
}
}
.brandstextlast {
margin-left:20px;
float:left;
text-align:left;
}
@media (max-width:768px) {
.brandstextlast {
margin-left:20px;
margin-top:20px;
float:left;
text-align:left;
}
}
<div class="checklogostyle">
<img src="{{'checklogo.png' | asset_url}}">
</div>
<div class="brandstextlast">
<span>Bernhardt <br> Century Furniture <br> John Richard <br> Hickory White</span>
</div>
<div class="checklogostyle">
<img src="{{'checklogo.png' | asset_url}}">
</div>
<div class="brandstextlast">
<span>Hooker Furniture <br> Hudson Valley <br> Robert Abbey <br> Theodore Alexander</span>
</div>
<div class="checklogostyle">
<img src="{{'checklogo.png' | asset_url}}">
</div>
<div class="brandstextlast">
<span>Visual Comfort <br> Vanguard Furniture <br> Uttermost <br> Yachtline</span>
</div>
I believe I need to wrap the content in a container, but I can't quite figure it out. Any assistance would be greatly appreciated, especially if you can explain the reasoning behind it so I can apply it to other projects in the future!
Thank you!