【发布时间】:2021-11-17 17:59:28
【问题描述】:
在我当前的 ASP.Net 核心中,我正在尝试为页面上的搜索组件进行引导样式设置。我希望用户界面看起来像
标签/输入框和“搜索”按钮出现在屏幕中间的位置,“新建”显示在同一行但出现在屏幕右侧
我已经尝试过如下
<div class="center">
<form asp-action="Index" method="get">
<div class="row">
<div class="col-lg-12">
<div class="row mb-3">
<div class="col-lg-4 col-md-2 form-check-inline mr-0">
<label class="col-auto" for="holiday"> Find by Holiday </label>
<input type="text" class="form-control" name="SearchString" value="@ViewData["CurrentFilter"]" />
</div>
<div class="col-lg-4 col-md-2 form-check-inline mr-0">
<input type="submit" value="Search" class="btn btn-info" />
<a class="btn btn-link" asp-action="Index">Back to Full List</a>
</div>
<div class="col-lg-4 col-md-2 form-check-inline mr-0" style="text-align:right">
<a class="btn btn-info" asp-action="Create">Create New</a>
</div>
</div>
</div>
</div>
</form>
</div>
UI 如下所示
谁能帮我说一下我错过了什么,为什么所有的东西都显得如此接近,我尝试添加 style="text-align:right" 以便 Create new 将出现在右侧
***** 编辑 *****
【问题讨论】:
标签: html css asp.net-core razor asp.net-core-mvc