Yes, those styles work. <img> is an exception to the rule. It is technically an inline element, but it behaves more like an inline-block element in many browsers.

I withdraw my solution.