[英]Textbox width in razor
how to adjust textbox width in razor code? 如何在剃须刀代码中调整文本框的宽度? My code below does not work:
我的以下代码不起作用:
@Html.EditorFor(model => model.PDFLink, new { htmlAttributes = new {@class = "form-control",style="width:300px" } })
Thanks. 谢谢。
You can create a class with the Width you want and use that class for all text box you want. 您可以使用所需的宽度创建一个类,并将该类用于所需的所有文本框。 Something like below.
像下面这样。
.setWith { max-width: 350px; }
@Html.EditorFor(model => model.PDFLink, "", new { @class = "form-control setWith", placeholder = "If You want Any.." })
我做了这样的事情,它的工作原理。
@Html.EditorFor(model => model.PDFLink, new { htmlAttributes = new { @class = "form-control",@style="100% !important; min-width:600px;" } })
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.