Trying to wrap an image in a container and have the container always be the dimensions of the child image but the width and height of the container are only resized to the image when the browser is resized horizontally and not when the browser is resized vertically.
I have a demo of the problem here: http://codepen.io/anon/pen/ksDFm
Using display inline-block to wrap the div around the image.
If you load the page and then resize the browsers height but not width the containers width does not change. If you resize the browsers width it works like I would expect. Any way to fix this?