Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 表单中输入字段的右对齐不起作用_Twitter Bootstrap_Bootstrap 5 - Fatal编程技术网

Twitter bootstrap 表单中输入字段的右对齐不起作用

Twitter bootstrap 表单中输入字段的右对齐不起作用,twitter-bootstrap,bootstrap-5,Twitter Bootstrap,Bootstrap 5,我有一个表单,有三列,每列有多对label+输入。我正在努力使输入字段与行的右端对齐。我曾经在Bootstrap3中使用pull right来实现这一点,但是我不知道在V5中它的等效性是什么。我已经尝试了justify content end,float right,和align items right,但没有效果 这就是它目前的样子: 购买价格 基础冰 折扣 零售价 Gesamtnachlass auf Basisfahrzeug 标价 Gesamtnachlass auf Basisfa

我有一个表单,有三列,每列有多对label+输入。我正在努力使输入字段与行的右端对齐。我曾经在Bootstrap3中使用pull right来实现这一点,但是我不知道在V5中它的等效性是什么。我已经尝试了
justify content end
float right
,和
align items right
,但没有效果

这就是它目前的样子:


购买价格
基础冰
折扣
零售价
Gesamtnachlass auf Basisfahrzeug
标价
Gesamtnachlass auf Basisfahrzeug(%)
Gesamtnachlass auf Listenpreis(%)
Gesamtnachlass inkl。Händleroptionen(%)
Überbewertung批发(欧元)
Überbewertung Merbag(欧元)
经销商折扣基数(%)
经销商折扣列表(%)
韦布雷班德保证金(欧元)

根据引导程序5

float right
现在是
float end

没有
align items right


这对我的物品没有任何影响。我现在将PurchasePrice更改为PurchasePrice,以使文本将输入推向右侧。是的,显然使用所有12列单位将扩大空间,但是关于“向右浮动”,您的问题已经得到了回答。
<form>
    <div class="row">
        <div class="col-md-4">
            <div class="row m-1">
                <label class="col-sm-5 col-form-label">PurchasePrice</label>
                <div class="col-sm-4 align-self-end d-flex justify-content-end">
                    <input asp-for="PurchasePrice" class="form-control align-self-end d-flex justify-content-end" />
                    <span asp-validation-for="PurchasePrice" class="text-danger"></span>
                </div>
            </div>
            <div class="row m-1">
                <label class="col-sm-5 col-form-label">BasicPrice</label>
                <div class="col-sm-4">
                    <input asp-for="BasicPrice" class="form-control float-right" />
                    <span asp-validation-for="BasicPrice" class="text-danger"></span>
                </div>
            </div>

            <div class="row m-1">
                <label class="col-sm-5 col-form-label">Discount</label>
                <div class="col-sm-4">
                    <input asp-for="Discount" class="form-control float-right" />
                    <span asp-validation-for="Discount" class="text-danger"></span>
                </div>
            </div>

            <div class="row m-1">
                <label asp-for="RetailPrice" class="col-sm-5 col-form-label">RetailPrice</label>
                <div class="col-sm-4">
                    <input asp-for="RetailPrice" class="form-control float-right" />
                    <span asp-validation-for="RetailPrice" class="text-danger"></span>
                </div>
            </div>
            <div class="row m-1">
                <label asp-for="IncludedDealerOptionPrice" class="col-sm-5 col-form-label">Gesamtnachlass auf Basisfahrzeug</label>
                <div class="col-sm-4">
                    <input asp-for="IncludedDealerOptionPrice" class="form-control float-right" />
                    <span asp-validation-for="IncludedDealerOptionPrice" class="text-danger"></span>
                </div>
            </div>
            <div class="row m-1">
                <label asp-for="Listprice" class="col-sm-5 col-form-label">ListPrice</label>
                <div class="col-sm-4">
                    <input asp-for="ListPrice" class="form-control float-right" />
                    <span asp-validation-for="ListPrice" class="text-danger"></span>
                </div>
            </div>
        </div>

        <div class="col-md-4">
            <div class="row m-1">
                <label asp-for="OverallDiscountBasic" class="col-sm-5 col-form-label">Gesamtnachlass auf Basisfahrzeug (%)</label>
                <div class="col-sm-4">
                    <input asp-for="OverallDiscountBasic" class="form-control float-right" />
                    <span asp-validation-for="OverallDiscountBasic" class="text-danger"></span>
                </div>
            </div>
            <div class="row m-1">
                <label class="col-sm-5 col-form-label">Gesamtnachlass auf Listenpreis (%)</label>
                <div class="col-sm-4">
                    <input asp-for="OverallDiscountList" class="form-control float-right" />
                    <span asp-validation-for="OverallDiscountList" class="text-danger"></span>
                </div>
            </div>

            <div class="row m-1">
                <label class="col-sm-5 col-form-label">Gesamtnachlass inkl. Händleroptionen (%)</label>
                <div class="col-sm-4">
                    <input asp-for="OverallDealerDiscount" class="form-control float-right" />
                    <span asp-validation-for="OverallDealerDiscount" class="text-danger"></span>
                </div>
            </div>

            <div class="row m-1">
                <label asp-for="RetailPrice" class="col-sm-5 col-form-label">Überbewertung Wholesale (€)</label>
                <div class="col-sm-4">
                    <input asp-for="OvervaluationWholeSale" class="form-control float-right" />
                    <span asp-validation-for="OvervaluationWholeSale" class="text-danger"></span>
                </div>
            </div>

            <div class="row m-1">
                <label asp-for="Listprice" class="col-sm-5 col-form-label">Überbewertung Merbag (€)</label>
                <div class="col-sm-4">
                    <input asp-for="OvervaluationMerbag" class="form-control float-right" />
                    <span asp-validation-for="OvervaluationMerbag" class="text-danger"></span>
                </div>
            </div>
        </div>

        <div class="col-md-4">
            <div class="row m-1">
                <label asp-for="DealerDiscountList" class="col-sm-5 col-form-label">Dealer Discount Basisfahrzeug (%)</label>
                <div class="col-sm-4">
                    <input asp-for="DealerDiscountBasic" class="form-control float-right" />
                    <span asp-validation-for="DealerDiscountBasic" class="text-danger"></span>
                </div>
            </div>
            <div class="row m-1">
                <label class="col-sm-5 col-form-label">Dealer Discount Listenpreis (%)</label>
                <div class="col-sm-4">
                    <input asp-for="DealerDiscountList" class="form-control float-right" />
                    <span asp-validation-for="DealerDiscountList" class="text-danger"></span>
                </div>
            </div>
            <div class="row m-1">
                <label class="col-sm-5 col-form-label">Verbleibende Marge (€)</label>
                <div class="col-sm-4">
                    <input asp-for="Margin" class="form-control float-right" />
                    <span asp-validation-for="Margin" class="text-danger"></span>
                </div>
            </div>
        </div>
    </div>
</form>