c# - 增加文本框大小 Bootstrap (ASP.NET MVC)

标签 c# html asp.net asp.net-mvc twitter-bootstrap

有没有办法增加水平文本框的大小(长度)?

<div class="form-horizontal">
    <div class="form-group">
        @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
        <div class="col-md-10">
                @Html.TextBoxFor(model => model.Name, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
</div>

我已经尝试更改 col-md-* 类,但没有成功。

最佳答案

所有答案都有帮助。

我的解决方案是更改我的 css 中的默认最大宽度,因为它限制了大小

input, select, textarea {
    max-width: 500px;
}

然后更改 col-md-* 类工作正常。

谢谢

关于c# - 增加文本框大小 Bootstrap (ASP.NET MVC),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24677044/

相关文章:

c# - 如果两个字段不匹配,则将新行插入数据库表,否则在特定列中求和值

javascript - 迭代对象数组中存在的对象数组

javascript - Z-index 大于 Fancybox?

javascript - 是否可以在一页 HTML 内容上限制用户?

asp.net - 当只有一件事发生变化时,为什么 ASP.NET 会重新编译(重新 JIT)所有​​内容?

C#,使用接口(interface)

c# - K均值算法C#

ASP.NET核心: Dependencies: Latest Versions

html - 单击某个控件时 CSS 会失真

c# - 使用 JavaScript 在 GridView 中选择行