Well what you are trying to do is possible but requires workarounds due to the fact that css does not offer vertical align for these elements.
There are several workarounds you can try:
The best way of doing it requires you to know the height of your element. Is there no way of you working this out?
A very poor way of doing it would be to create a 1 cell table with width 100%, text-align: center and vertical-align: middle;
There are likely to be some solutions around the web, do a search on google for vertical aligning a div.