Two horizontally aligned, vertically centered divs


I have a problem that is driving me crazy.

I have a wrapper div that contains a div with some text, and an image. The sizes of the image and the div vary. The wrapper div adjust to the size of the larger one.

Both of them should be vertically aligned, like here:

enter image description here

I came across this post:

As you can see in the fiddle right here:
It does not work as expected

I'd be glad if someone could help me with this one.

Problem courtesy of: NSAddict


All you have to do is wrap your each content into .container div. Updated jsfiddle

Solution courtesy of: Morpheus


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.