0

I am having a problem with vertically aligning my text which is shown on top of my image. It works fine for one resolution but as the height of the image changes the text is no longer vertically aligned.

I believe the problem is on this line: <div class="block" style="height:100%;"> If I could change the height variable to the size of the image as it resizes then I think it would work but I am not sure how to do that.

The HTML and CSS code for my problem are on a fiddle.

CODE HERE

Any help would be greatly appreciated, thanks!

user3170837
  • 141
  • 2
  • 9
  • From what I can tell the text remains vertically aligned in the fiddle you provided. Do you mean horizontal alignment? The text remained centered while re-sizing the image for me. – Zach M. Mar 03 '14 at 16:31
  • These answers may be adaptable to your question http://stackoverflow.com/questions/489340/how-do-i-vertically-align-text-next-to-an-image-with-css – Zach M. Mar 03 '14 at 16:52

0 Answers0