Anatoli
Anatoli

Reputation: 690

How to fix the cursor size?

I have a textarea with different font-size and line-height. I made it for spacing between lines in textarea.

When I press enter inside textarea I get the big cursor. How I can fix this problem?

textarea {
    font-size: 28px;
    line-height: 92px;
}
<textarea></textarea>

enter image description here

I've found several questions that are very similar. But these solutions don't work.

Thanks in advance

Upvotes: 1

Views: 1027

Answers (2)

Dave Everitt
Dave Everitt

Reputation: 17876

It's the large value of the line-height property that's causing this - change it to something nearer the font size and your cursor will reduce in size.

The line-height property is mainly good for two things: vertically centering single lines of text, and increasing line spacing, but the latter is problematic in a text field.

Upvotes: 1

Starfish
Starfish

Reputation: 3574

There is no property regarding size of cursor but still you can use custom cursors by adding an image like:

cursor: url('cursor.png');

Upvotes: 3

Related Questions