On this question there is a great solution on how to add centred image to the page.
- Pure CSS solution
- Not breaking the document flow (no floats or absolute positioning)
- Cross browser compatibility (even IE6)
- Completely responsive.
- vertically centered
The solution http://jsfiddle.net/avrahamcool/d89xh/
* {
padding: 0;
margin: 0;
}
#over {
position: absolute;
width: 100%;
height: 100%;
text-align: center;
}
.Centerer {
display: inline-block;
height: 100%;
vertical-align: middle;
}
.Centered {
display: inline-block;
vertical-align: middle;
}
<div id="over">
<span class="Centerer"></span>
<img class="Centered" src="http://th07.deviantart.net/fs71/200H/f/2013/236/d/b/bw_avlonas_a5_beach_isles_wallpaper_image_by_lemnosexplorer-d6jh3i7.jpg" />
</div>
But how to modify that solution to add an extra text just underneath the centered image so it will be always centered as well.
Any thoughts?