how do you increase the height of an html textbox

mrblah picture mrblah · Jul 20, 2009 · Viewed 354.6k times · Source

How do you increase the height of an textbox? (along with its font size)

Answer

Paul Dixon picture Paul Dixon · Jul 20, 2009

I'm assuming from the way you worded the question that you want to change the size after the page has rendered?

In Javascript, you can manipulate DOM CSS properties, for example:

document.getElementById('textboxid').style.height="200px";
document.getElementById('textboxid').style.fontSize="14pt";

If you simply want to specify the height and font size, use CSS or style attributes, e.g.

//in your CSS file or <style> tag
#textboxid
{
    height:200px;
    font-size:14pt;
}

<!--in your HTML-->
<input id="textboxid" ...>

Or

<input style="height:200px;font-size:14pt;" .....>