我在下面的代码中尝试使用 Bootstrap 的类调整文本输入元素的大小。但是,我无法缩小尺寸。我希望它在桌面上更小,而不是占用大量空间。
<div class="container White_BG">
<div class="row" style="margin-left:0;margin-right:0;">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<h1>Quickly place your order with this form.</h1>
<h2>Please enter the item numbers that you wish to order; once you add to the cart, then you will be able to change the quantity of those items ordered.</h2>
<div class="table-responsive">
<form method="post" name="QuickOrderMulti">
<table class="table table-bordered table-condensed table-hover">
<tr>
<th>Item #</th>
<th>Quantity</th>
<th>Description</th>
<th>Price</th>
<th>Subtotal</th>
</tr>
<tr>
<td>
<div class="col-lg-2">
<input type="text">
</div>
</td>
<td>
<input type="text">
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
违规行是:
<td>
<div class="col-lg-2">
<input type="text">
</div>
</td>
我尝试使用 col-lg-2
让它只占用 2 个网格列,所以它可能会更小。但没有这样的运气。
最佳答案
与其将它包围在一个 div 中,不如尝试使用所选类进行输入。
例如
<input class="col-lg-2" type="text">
关于css - 使用 Bootstrap 的类在表内调整输入文本的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22789584/