Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

style text inside textarea

I'm working in this form which its design is exactly like this:

enter image description here

Right now I'm at this stage, so working some little details: enter image description here

As you will be able to see the "Your text..." is sticked to the top left corner of the textarea. I'm trying to find a way to manipulate this via CSS if possible. I just need to apply some margin/padding to the text inside the textarea. If this is not possible with CSS I'm open for suggestions.

How to manipulate via CSS the text inside the textarea???

like image 278
Daniel Ramirez-Escudero Avatar asked Aug 30 '12 18:08

Daniel Ramirez-Escudero


People also ask

Can you style textarea?

You can style text inside textarea similarly as you can do with any other HTML inputs. You can also use any CSS property like font-size , font-family , color , etc.

Can I put Div inside textarea?

You cannot place HTML elements inside a text area, only text content. only text content covers that part.

Does textarea have type attribute?

The <textarea> element does not have a type attribute. The HTML <textarea> element represents a multi-line plain-text editing control, and is useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form.

How make textarea responsive CSS?

Try textarea {max-width:95%;} - it will always fit your display. Show activity on this post. I set the number of columns to slightly greater that the width of the div on a large screen and as the screen gets smaller it acts responsive to the screen size.


1 Answers

You can use CSS padding property:

textarea {
    padding: 5px;
}
like image 117
undefined Avatar answered Oct 12 '22 22:10

undefined