我有一个使用 bootstrap 的 asp 页面,但我不知道如何更改表单组中标签的大小。如果我更改 <div>
列大小它改变标签和输入的宽度。我需要标签很长但输入很短。这是我所拥有的。很基本。在下面的代码中,我只需要标签大小为 8,输入大小为 3。我尝试将输入包装在它自己的 div 中,但格式看起来非常糟糕。
<div class="form-group">
<div class="col-xs-8">
<asp:label class="control-label dark-label">Inititiating Date: (if different than request date)</asp:label>
<asp:TextBox ID="initDate" runat="server" class="form-control" placeholder="Inititiating Date"></asp:TextBox>
</div>
</div>
最佳答案
如果我没理解错的话,您可以添加标签和输入网格类 (col-xs-
)
像这样:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="form-group">
<label class="control-label dark-label col-xs-8">Inititiating Date: (if different than request date)</label>
<input class="col-xs-3" type="text" ID="initDate" class="form-control" placeholder="Inititiating Date" />
</div>
关于html - 表单组中的 Bootstrap 标签和输入大小调整,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35898221/