0

I want to alter the height of a single row in a textarea. So I'm looking for something like row-height:20px; If that exists that would be great. As I'm guessing that it does not, what do I do? Thanks in advance.

I want a textarea that is a single row but that has a height of 20 px. I cannot use the css height function to set this.

1
  • For your second question: illustrate what you are trying to accomplish better and people (including me) will be better able to help you. Commented Nov 24, 2012 at 18:50

1 Answer 1

4

You want line-height:

textarea { line-height: 2em; }
6
  • May I offer a demo? One day I'll remember: post first, demonstrate second... =/ Commented Nov 24, 2012 at 18:53
  • I tried this but it seems to keep the same height for the textarea and shift my text out of the box. Ideas? Commented Nov 24, 2012 at 18:55
  • Ahh i misread question to say "One row in textarea to be 20px line height". Nice! Commented Nov 24, 2012 at 18:55
  • @thatidiotguy I changed it so that it was a tad more clear :) Commented Nov 24, 2012 at 18:58
  • I read up on this line-height thing and I know that it is the correct way to do this so why is it not working? Commented Nov 24, 2012 at 19:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.