Removing the textarea border in HTML
Asked Answered
S

5

58

I'm working with the textarea element in HTML and want to remove the border of the box. I also want to align the text in the bottom of my textarea.

Stake answered 25/6, 2009 at 5:2 Comment(0)
P
95
textarea {
    border: none;
    outline: none;
}
Pitta answered 25/6, 2009 at 5:3 Comment(1)
That won't remove the scroll buttons in IE. My solution should cover that.Ansley
A
56

In CSS:

  textarea { 
    border-style: none; 
    border-color: Transparent; 
    overflow: auto;        
  }
Ansley answered 25/6, 2009 at 5:7 Comment(2)
@Ansley is it possible to include how to do this directly inside the <textarea> tag itself?Amabel
@user5783745: you can just put it in a style attribute: <textarea style="border-tyle: none; border-color: Transparent; overflow: auto"></textarea>Ansley
I
5

This one is great:

<style type="text/css">
textarea.test
{  
width: 100%;
height: 100%;
border-color: Transparent;     
}
</style>
<textarea class="test"></textarea>
Inlaid answered 15/8, 2011 at 22:40 Comment(0)
A
5

Also, you can remove the resize icon

textarea {resize:none;}
Aback answered 16/12, 2021 at 16:45 Comment(0)
K
1
textarea {
border: 0;
overflow: auto; }

less CSS ^ you can't align the text to the bottom unfortunately.

Knobloch answered 25/6, 2009 at 11:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.