If you just click {width: 100%} on the text field, you usually get a text field that overflows its container. This is because the width of the text fields will be 100% + padding + borders. You need to resist laying and borders.
An absolutely simple way to do this: add an addition to the wrap element .
The width of the entrance is 100% of its container + 1px + 1px (border) + 4px + 4px (addition). In other words, the width is 100% + 10 pixels; Therefore, we give the fix class an additional 10px pad on the right.
<!doctype html> <html lang="en"> <head> <style> label { padding: 0; marign: 0; display: block; } textarea { width: 100%; border: 1px solid #333; padding: 4px; } .the-fix { padding-right: 10px; } </style> </head> <body> <label class="the-fix"> A good-looking textarea with a 100% width <textarea></textarea> </label> </body> </html>
for transparency just use CSS DUDE ----
<textarea style="color: black; background-color: transparent;">Your text</textarea>
source share