S
S
Sergey Pugovkin2016-04-10 14:42:00
css
Sergey Pugovkin, 2016-04-10 14:42:00

How, let's say, to force "em" to take into account the line-height?

You need to set the height of the textarea to 20 lines. It would be desirable through css. Through attribute "rows" works. But setting it via css as "height: 20em" did not give the expected results, because there is also such a property as "line-height", which affects the height of the line and which takes into account the "rows" attribute, but does not take into account "em". Any "pt", "%", "vw", "vh", etc. - also, the campaign, they do not take into account (or looked badly).
Any solutions besides manually multiplying 20 by line-height? I am using bootsrap.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-04-10
@Driver86

line-height cannot change the height of a textarea. Multiply.
And remember that 20 em = 20 lines only if line-height = font-size.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question