Asp.net mvc 在输入组加载项范围和表单控件之间获取奇数空格

Asp.net mvc 在输入组加载项范围和表单控件之间获取奇数空格,asp.net-mvc,twitter-bootstrap,model-view-controller,twitter-bootstrap-3,asp.net-mvc-5,Asp.net Mvc,Twitter Bootstrap,Model View Controller,Twitter Bootstrap 3,Asp.net Mvc 5,我是新手,在使用输入组和输入组插件时遇到问题。我已经尽我所能找到其他人有同样的问题,但没有结果 输入组在md大小的屏幕上看起来很棒,但拒绝在任何其他屏幕大小上与表单控件对齐 医学博士: lg: xs&sm 这是我的密码: <div class="form-group col-md-6 col-lg-4"> @Html.LabelFor(model => model.Weight, new { @class = "control-label col-md-6" })

我是新手,在使用输入组和输入组插件时遇到问题。我已经尽我所能找到其他人有同样的问题,但没有结果

输入组在md大小的屏幕上看起来很棒,但拒绝在任何其他屏幕大小上与表单控件对齐

医学博士:

lg:

xs&sm

这是我的密码:

<div class="form-group col-md-6 col-lg-4">
    @Html.LabelFor(model => model.Weight, new { @class = "control-label col-md-6" })
    <div class="input-group col-md-6">
        @Html.EditorFor(model => model.Weight, new { @class = "form-control" })
        <span class="input-group-addon">lbs</span>
        @Html.ValidationMessageFor(model => model.Weight)
    </div>
</div>

@LabelFor(model=>model.Weight,新的{@class=“controllabel col-md-6”})
@EditorFor(model=>model.Weight,新的{@class=“form control”})
磅
@Html.ValidationMessageFor(model=>model.Weight)

我尝试使用“col-lg-pull-2”来拉加载项跨度,但没有效果。有什么想法吗

Html.EditorFor
没有接受Html属性作为参数的版本


改为使用
Html.TextBoxFor

您使用的是我们看不到的其他CSS吗?您唯一看不到的其他CSS是它位于水平表单中。@Deryck我对您的评论感到困惑。看来你只是在攻击我。这是使用引导类的一个问题。我没有编辑默认的Bootstrap 3类。@Gaby的解决方案有效。还有另一种避免类似问题的方法。退房你的代码是cleaner@Dmitry当我问这个问题时,我实际上正在将所有内容转换为TwitterBootstrapMVC,并在转换之前等待解决这个问题。当然,我没有意识到它会在一开始就解决我的问题。非常感谢,这很有效!你知道吗,这不是“严格意义上的CSS问题”,事实上是MVC剃须刀的问题。