MrS1ck
MrS1ck

Reputation: 237

Pushing the text down a few pixels from the top in my text area?

I have a text area in my contact form, nothing too special:

<textarea class="txb_message" id="txb_message" name="txb_message" placeholder="What would you like to talk about?"></textarea>

But the text doesn't align in the text area as it does in the text boxes above it, and I'm not sure why.

I need to push the content of the text area down

Thanks!

Upvotes: 0

Views: 696

Answers (3)

hungerstar
hungerstar

Reputation: 21725

I would just add padding to the top of the textarea.

.txb_message {
     padding: 10px 0 0 0;  /* whatever you need */
}

Possibly to the sides also since you are using text-indent and then remove that for the textarea. Your final CSS might look like this:

.txb_message {
     padding: 10px;
     text-indent: 0;
}

Try filling out your textarea with a bunch of text.

Upvotes: 1

Parker Hutchinson
Parker Hutchinson

Reputation: 1721

you need to add 15px of padding to the textarea like so :

.txb_message {
  height: 68px;
  width: 300px;
  float: left;
  margin-top: 10px;
  padding: 15px 0 0 0;
}

Upvotes: 1

Kevin Lynch
Kevin Lynch

Reputation: 24733

Add padding-top

.txb_message {
    padding-top: 10px;
}

Upvotes: 1

Related Questions