Skip to content Skip to sidebar Skip to footer

Automatically Scale An Image To Match Text Height

I've got an image which I want to use inline with some text, but I need it to match the text height. I know it's possible to something like or e

Solution 1:

Did you try this giving the image height as 1em?

img {height: 1em;}

Check out the fiddle here: http://jsfiddle.net/yAr7z/


Post a Comment for "Automatically Scale An Image To Match Text Height"