0

I'm using:

#leftfoot {padding-left: 20px; vertical-align: middle;}

It does not work. I've look at plenty of explanations, none of them seem to work for me. Does anybody else know how to vertically align more than one line of text?

Shakes fist angrily at CSS.

Zevoxa
  • 291
  • 1
  • 6
  • 17

2 Answers2

1
#leftfoot {
    height: 110px;
    display:table-cell;
    vertical-align: middle;
    padding-left: 20px;
}

Your issue is the following: Your text was indeed centered vertically, but your inner div had just the same height as the text and was not extending to the bounds of the outer div, so you have to set a height for the inner div to work.

Garrin
  • 541
  • 1
  • 3
  • 8
1

Your question is not clear, create a JsFiddle. For better understanding of Vertical-align http://css-tricks.com/what-is-vertical-align/

Nobal Mohan
  • 466
  • 7
  • 20
  • found a similar question too http://stackoverflow.com/questions/489340/how-do-i-vertically-align-text-next-to-an-image-with-css?rq=1 – Nobal Mohan May 15 '13 at 05:07