Can we reduce cursor height same as font-height if we specify line-height greater than font-size. Have a look at this fiddle in Chrome browser and you will get what I am talking about. This works fine in Firefox, issue is only in Chrome browser. Textarea html is :
<TEXTAREA style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 50px; height: 150px;"></TEXTAREA>
EDIT:
I want line-height space between lines as i have background image for textarea with horizontal lines on which i am trying to place the text.
Body text (your normal paragraph text) should have a line-height of 1.4–1.6, give or take.
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.
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.
It turns out that's pretty simple: just use the line-height CSS property and then apply it. I have an example below. Then, you can apply that CSS class to your HTML. Now, the space between the lines changes.
It sounds as if you want to change the Caret located inside the text area. Here's a post that covers this.
Styling text input caret
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