Home  >  Article  >  Web Front-end  >  Solution to the problem that the text is in the lower left corner and cannot be changed in size during textarea layout

Solution to the problem that the text is in the lower left corner and cannot be changed in size during textarea layout

高洛峰
高洛峰Original
2017-03-01 14:32:521624browse

The text on the left side of the textarea text area is always at the lower left side of the textarea, which looks unsightly; the textarea text area has clearly set cols and rows, but it can still change the size. For the above problems, you can refer to the solutions in this article. Two small problems, but they have been bothering me for a long time

The first problem

The text on the left side of the textarea text area is always on the lower left side of the textarea, which looks unsightly

You can do it by setting an attribute

The code is as follows:

<label style="vertical-align:top" >备注信息:</label><textarea rows="5" cols="65"></textarea>


Second question

The textarea text area has clearly set cols and rows, but it can still change the size

The same attribute can be done

The code is as follows:

<textarea rows="5" cols="65" style="resize:none;"></textarea>


Done!

So simple?

Well it’s that simple!!!

If you don’t believe it, go and try it!

For more related articles on the solution to the problem that the text is on the lower left side and cannot be changed in textarea layout, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn