How I can compute the line-height?

Hi,I am just curious how can we compute the line-height in font?..because I found some CSS snippet having this value of line-height => line-height:1.42857;

You can include the line height with or without metric units. If you use it without (as in your example), the line height will be set to 1.42857 x font-size.

1 Like

Hi @ralphm Thank you for the quick reply.but how does 1.42857 come up?

What do you mean by “come up”?

I just found that value in some css in bootstrap having line-height of 1.42857,I don’t how it was computed.

I’d question anything coming to that precise of a float value. What are you wanting to do with it once you’ve got it?

@Mittineague,so that I will know how to put exact value if I am using the line-height property.,

The value for line-height is whatever you think it ought to be to look right. I generally use 1.4, because I find well-spaced text easier to read. YMMV.

@TechnoBear,Ah ok,Thank you for enlighten me