如何设置浮动按钮的宽度

时间:2019-04-15 08:48:19

标签: html css twitter-bootstrap

此按钮正在影响与它在同一行中的所有内容,我如何使其固定而不影响它在同一行中的所有内容。这些字段受保存按钮的影响。如果保存按钮与表单字段在同一行,则会影响表单字段

<div class="row">
        <div class="col-md-4">
            <form asp-action="Create">
                <div asp-validation-summary="ModelOnly" class="text-danger"></div>
                <div class="form-group">
                    <input type="hidden" asp-for="EmployeeCode" value="@EmpCode" />
                </div>
                <div class="form-group">
                    <label asp-for="IndustryId" class="control-label"></label>
                    <select asp-for="IndustryId" class="form-control" asp-items="ViewBag.IndustryId"></select>
                </div>
                <div class="form-group">
                    <label asp-for="SubIndustryId" class="control-label"></label>
                    <select asp-for="SubIndustryId" class="form-control" asp-items="ViewBag.SubIndustryId">
                        <option selected> - None - </option>
                    </select>
                </div>
                <div class="form-group">
                    <label asp-for="YearsExp" class="control-label"></label>
                    <input asp-for="YearsExp" class="form-control" />
                    <span asp-validation-for="YearsExp" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="Proficiency" class="control-label"></label>
                    <input asp-for="Proficiency" class="form-control" />
                    <span asp-validation-for="Proficiency" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="BusinessArea" class="control-label"></label>
                    <input asp-for="BusinessArea" class="form-control" />
                    <span asp-validation-for="BusinessArea" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="Feature" class="control-label"></label>
                    <input asp-for="Feature" class="form-control" />
                    <span asp-validation-for="Feature" class="text-danger"></span>
                </div>
                <div class="fixed-bottom">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="text-right" style="margin-bottom:20px;">
                                    <input type="submit" value="Save Changes" class="btn btn-primary" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="fixed-bottom">
      <div class="container">
        <div class="row">
          <div class="col-md-12">
            <div class="text-right" style="margin-bottom:20px;">
              <input type="submit" value="Save Changes" class="btn btn-primary" />
            </div>
          </div>
        </div>
      </div>
    </div>

1 个答案:

答案 0 :(得分:0)

我在此处创建了预览:https://www.bootply.com/eItE7SJoQb

也许如果您不希望其影响“事物在同一行上”,那么。