October 22, 2024
Chicago 12, Melborne City, USA
CSS

CSS textarea Increased Line Height for newlines


When the user inputs a textarea, a line break due to wrapping looks the same as a line break due to the user entering a newline. I want the first line after a newline character to be spaced a bit further down than wrapped lines are spaced. The idea is that the user is typing paragraphs of text and they hit ENTER to start a new paragraph. It should be apparent visually where paragraphs start.

I could probably get this effect using JavaScript to replace each newline with two newlines as the user types, but I was hoping to do it with CSS.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video