Vertically Center - with unknown height

Posted by panthro on Stack Overflow See other posts from Stack Overflow or by panthro
Published on 2014-05-27T09:07:00Z Indexed on 2014/05/27 9:25 UTC
Read the original article Hit count: 145

Filed under:

I have two div's side by side. On the left is an image, on the right are inputs.

The image varies depending on what the user uploads.

How can I vertically centre align the image and the inputs? I would like the inputs to appear vertically centre to the image.

Both the img and inputs have their own container:

<div class="img-container">
<div class="data-container">

Fiddle: http://jsfiddle.net/vbLht/

© Stack Overflow or respective owner

Related posts about css