[英]textarea not expanding according to the content
I am using a textarea
inside which i am getting some values from local db.我正在使用一个
textarea
,在其中我从本地数据库中获取一些值。 The problem is the height of textarea
is not resizing to the content available and rather its shrinked and only displaying one line.问题是
textarea
的高度没有调整到可用内容的大小,而是缩小并且只显示一行。 I tried adding CSS but it doesn't seems to work.我尝试添加 CSS 但它似乎不起作用。 Any help or suggestion will be appreciated.
任何帮助或建议将不胜感激。
XSL
<textarea id="post-text"><xsl:value-of select="$txn_desc"/></textarea>
CSS
textarea {
width: 100%;
height:100%;
}
try adding尝试添加
textarea {
width: 100%;
height: auto;
overflow: hidden
}
and also make sure the parent html element have an appropriate height as well.并确保父 html 元素也具有适当的高度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.