Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

line-height vs cursor height issue in Textarea in chrome

Tags:

html

jquery

css

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.

like image 329
imVJ Avatar asked Jul 20 '13 08:07

imVJ


People also ask

What is line height normal?

Body text (your normal paragraph text) should have a line-height of 1.4–1.6, give or take.

How is line height calculated?

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.

What is the line height property primarily used for?

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.

How do I change the height of a line in HTML?

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.


1 Answers

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

like image 56
Micah Cooper Avatar answered Oct 09 '22 01:10

Micah Cooper