简体   繁体   中英

How to make input box bigger as text area?

I have searching everywhere to find answer for this problem but didn't found, how to make input box wide and bigger as text area where we can set their cols and rows?

My code as below:

<td align="right">
    <input type="text" value="<?php echo $row_remark['remark']; ?>" name="remark" rows="8" cols="30">
</td>

That's because you can't. Why? because that's what <textarea> is for.

You can use the textarea tag for that. Here is an example:

<textarea cols="30" rows="10"></textarea>

You can use the cols and rows properties to give the box the size you are looking for.

Use a <textarea> instead. It's a bit counter-intuitive, but this is effectively an input type as well. Not sure why textarea isn't a valid <input type='textarea' ...> but it's not; Rather, it's an explicit tag.

对于输入类型的文本,您不能这样做,可以使用css的高度和宽度使其变大,但其中只能包含一行,因此,如果您想使用更大的空间,则必须使用chek bootstarp,它们具有一些不错的CSS文本区域

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM