Take the 2-minute tour ×

Is it possible to vertical align a image (variable height) in a div? And that it work in IE 7 and up? I know that it can be done with the display : table-cell but the table-cell is not supported in IE 7...

I hope somewone has a solution?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You should be able to accomplish this by using styles. This has been answered before here:

vertical alignment of elements in a div

share|improve this answer
add comment
<div style="border: 1px solid #000;line-height:100px;">
   something in here
share|improve this answer
add comment

Your Answer


