How to vertically align the text in a floated div? For example: I have a dynamic content with fixed height. if the content is small or big it has to automatically vertically align.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Table cells are the easiest solution.
Javascript is an alternative (measure the size and text size of the div, then adjust padding, or lineheight, or whatever).
edit: Or this awesome css:
CSS
HTML
Been meaning to make a blog post about this for a while, I think it’s time.