style text inside textarea

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

Right now I'm at this stage, so working some little details:

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???

Answers


You can use CSS padding property:

textarea {
    padding: 5px;
}

textarea {
padding: 5px;
box-sizing: border-box;
}

NOTE: box-sizing is CSS3 property. It's very useful, because without it width: 100% or other will not work as you expected.


You can use CSS to create the desired effect

textarea {
    padding : 20px;
    margin : 10px;
}

http://jsfiddle.net/SSY9y/


Yes, the padding from CSS applied to textarea is correct. But then you need to change the "rows" and the "cols" as the dimensions of the whole textarea changes.

Thank you!

Dani


You can use the code below:

line-height: _px;

put the same value of the height of the textarea.


Need Your Help

Laravel save / update many to many relationship

laravel laravel-4 eloquent relationship

Can anyone help me on how to save many to many relationship? I have tasks, user can have many tasks and task can have many users (many to many), What I want to achieve is that in update form admin ...

Shouldn't this cause an Overflow? It doesn't!

c# windows-phone-7

What's up with this, anyway? I do a simple multiplication: