Find pixel value for row height when it's “normal” in Chrome

I have textarea whose line-height is set to "normal". However, I can still get the actual pixel value in FireFox:

// firefox
>>> $("#post_body").css('line-height')
"19.1167px"

In Chrome, I cannot:

// chrome
>>> $("#post_body").css('line-height')
"normal"

How can I get the actual line height in Chrome?

+5
source share
2 answers

you can try installing css:

#post_body {line-height:1;}

Then the Chrome output will be the actual pixel.

+1
source

- - . node. , node em ex units , node. . "m" , clientWidth, .

-3

All Articles