+ 3

How can I make an 100% wide and heigh Text area.

26th Feb 2017, 11:30 AM
Claas Leo
Claas Leo - avatar
3 ответов
+ 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).
26th Feb 2017, 11:33 AM
Mark Foxx
Mark Foxx - avatar
+ 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 */ }
26th Feb 2017, 2:25 PM
visph
visph - avatar
0
make a class for ur text area, and in css type: width:100%; height:100%;
26th Feb 2017, 11:34 AM
Jordi sarrato
Jordi sarrato - avatar