views:

100

answers:

2

As I have an element with a percentage height I can't use the line-height hack. Does anyone have any ideas on how to solve this?

<div height="100%">
    I want to be vertically aligned in the middle
</div>
A: 

did you try style="line-height:100%;"

.. assuming its only 1 line.

Chris Klepeis
I believe line-height:100% is the default, where 100% is equal to the height of the font, not the height of the parent element.
ChrisInCambo