css3 - Resize image to current text height using CSS -


Context : I am trying to include inline images of no equations (PNG files) in a webpage. I know that it has already done it, but I am using it as a learning project. In this way, I am not interested in libraries which display mathematics, but this is the general answer to this question.

I would like the images to naturally measure their height current text height with a CSS style I'm a newbie in web design, but it seems that I should be able to include a style that looks like this:

  height: 80% * parent.text_height   

Is it with pure CSS? possible?

EMS is an relative units of measurement on the size of the text of the original element Depends. An M is almost the distance between the lines of text, so you can try:

  height: .8em;   

But keep in mind that inline elements (like a plain old img tag) do not accept height specifications.

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -