Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertically align text inside an element with a percentage height?

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>
like image 469
ChrisInCambo Avatar asked Jun 29 '09 08:06

ChrisInCambo


1 Answers

Here's what you want: http://www.jakpsatweb.cz/css/priklady/vertical-align-valid-solution-en.html

like image 186
Andrew Johnson Avatar answered Oct 22 '22 04:10

Andrew Johnson