Currently, my textarea is displayed like this: click here to see the picture.
I would like that height between each lines be less important.
UPDATE:
I tried line-height in the css file:
textarea{ line-height: 120%; }
but it doesn't work, just reduces the textarea height and doesn't reduce the height between lines.
How can I do it?
The line-height CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.
Sets line height to be equal to a multiple of the font size. If your font size is 10px, your line height will be 10px, 18px, and 20px, respectively. Sets line height as a percentage of the font size of the element. If your font size is 10px, your line height will be 3px, 5px, and 11px respectively.
Body text (your normal paragraph text) should have a line-height of 1.4–1.6, give or take.
You may try percentage
, em
, px
etc. and choose one for you. Some browsers like firefox have some errors with this.
Here is a working live demo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With