+ 3
How can I make an 100% wide and heigh Text area.
3 odpowiedzi
+ 7
Give it an id or class and change the width in CSS to 100%, but remember if that textarea is a child of another element you have to change the descendent element's width to 100% or 100vw (viewport width).
+ 2
And remember also that <body> is a block level element ( so default height is minimal height to wrap content ) and have some default margins, so if you want a really full sized text area ( or whatever element ), you need to style it a few:
body {
height:100%; /* maybe not always necessary, at least with <textarea> */
margin:0;
}
textarea {
width:100%;
height:100%;
resize:none; /* on some browsers, default behavior of textarea is to be resizable */
}
0
make a class for ur text area, and in css type:
width:100%;
height:100%;