Is there a way via CSS to set the image height to the line-height?

css

Solution

Use `img{height: 1em;} /* whatever your line height may be, it is affected by its font-size /*`

See this Updated Demo (Increase or decrease the font size to view the result.)

Problem

I have an image that's inline with text. That image is 32x32. I'm looking to have it auto size to the line height of where it's contained so it fits properly. Is there a way to do that? I'm looking to be able to place the image anywhere with an unknown line height and have it resize properly.

Original source