Struggling to center an h3 heading in the middle of an image within a grid? Look no further, as I have 3 images across one row - four columns per image/heading. Check out the desired layout https://i.stack.imgur.com/8VFRt.png
I've managed to center the images but now need to insert headings inside each image - see here for reference https://i.stack.imgur.com/64sQ1.png
Unsure about styling individual heading/image pairs or if it can be done under one class/id?
The text still needs styling (smaller and white) and intentionally different images are being used.
This is what my current code looks like -
HTML
<div class="row">
<div class="four columns">
<div id="video">
<h3>VIDEO</h3>
<img src="images/VIDEO.jpg" alt="Video" style="width:300px;height:150px;">
</div>
</div>
<div class="four columns">
<div id="blog">
<h3>BLOG</h3>
<img src="images/blog.jpg" alt="blog" style="width:300px;height:150px;">
</div>
</div>
<div class="four columns">
<div id="faq">
<h3>FAQ</h3>
<img src="images/faq.jpg" alt="FAQ" style="width:300px;height:150px;">
</div>
</div>
</div>
Various attempts with position relative/absolute were made without success. The CSS used to center the images is:
CSS
section#welcome img {
display: block;
margin-left: auto;
margin-right: auto;
}
There are two rows within the section with text in the row above that hasn't been included here as it's deemed irrelevant.
Your feedback on this issue would be greatly appreciated.