I'm trying to centre a h3 heading in the middle of an image and can't get it right. I have 3 images across one row - four columns per image/heading. Here's how it's supposed to look -
So far I have the images centred but need to put the headings inside each image -
I'm unsure whether I need to style up each individual heading/image or is there a way to do this under one class/id ?
I haven't styled the text up yet (needs to be smaller and white) and the images are purposely different.
Here's my code as it stands -
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>
I've tried a few different variations on position relative/absolute but haven't been able to get it right. I've centred the images using this css -
CSS
section#welcome img {
display: block;
margin-left: auto;
margin-right: auto;
}
The section has two rows with text in the row above. I haven't included that code as didn't think it relevant.
Any assistance would be appreciated.