How do you increase the height of an textbox? (along with its font size)
相关问题
- Views base64 encoded blob in HTML with PHP
- Carriage Return (ASCII chr 13) is missing from tex
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
Don't the
height
andfont-size
CSS properties work for you ?With inline style:
or with apart CSS:
HTML:
CSS:
Use CSS:
If you want multiple lines consider this:
Specify rows as needed.
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:
If you simply want to specify the height and font size, use CSS or style attributes, e.g.
Or
Increasing the font size on a text box will usually expand its size automatically.
If you want to set a height that is not proportional to the font size, I would recommend using something like the following. This prevents browsers like IE from rendering the text inside at the top rather than vertically centered.