user3557909
user3557909

Reputation: 25

How to keep textareas from overlapping

I have two textareas

<textarea>Text area 1</textarea>
<textarea>Text area 2</textarea>

I want to position themselves ontop of eachother like so:

enter image description here

However i do not want to use <br>.

Is there another way to do this in CSS? For example, messing with textarea margin or display properties?

Thanks.

Upvotes: 1

Views: 4068

Answers (2)

APAD1
APAD1

Reputation: 13666

Just make the textareas block elements.

textarea {
    display:block;
    margin-bottom:1em;
    clear:both;
}

JSFiddle

Upvotes: 11

jmore009
jmore009

Reputation: 12931

just set the textarea's to display: block and then you can use margin to adjust the spacing

JSFIDDLE

Upvotes: 3

Related Questions