【发布时间】:2017-07-12 14:21:50
【问题描述】:
在 HTML 表格单元格中,我有一个文本输入元素,后跟一些标准文本。我希望这两个项目都是内联的。
这工作正常,直到我导入 bootstrap.css,此时项目显示在单独的行上,就好像它们之间存在换行符一样。
我不确定如何“覆盖”正在应用的任何样式引导程序。
请看下面我的 JS Fiddle。我已经包含了 bootstrap.min.css 资源。
您可以看到文本输入字段和字符串“m”在每个单元格中位于不同的行上。
删除 Bootstrap.css 外部资源并再次按运行后,项目将内联。
如何覆盖 Bootstrap CSS 应用的任何样式? (我需要 Bootstrap CSS 来做其他事情)。
谢谢
https://jsfiddle.net/87tdupys/9/
<!--Desired: text input field plus text "m" inline. However, Bootstrap.min.css is causing the 2 items to display on separate lines. This can be shown by removing the external reference to bootstrap.min.css (in the left hand External Resources pane). How can I override this behaviour, and force the 2 items to be inline?-->
<table id='assetConfigLayoutTable' border='1px'>
<tr>
<td>
<label>Capacity A</label>
</td>
<td style="width:200px">
<input type="text" class="form-control" style="width:50px;"> m
</td>
<td>
<label>Capacity B</label>
</td>
<td style="width:200px">
<input type="text" class="form-control" style="width:50px"> m
</td>
</tr>
</table>
【问题讨论】:
标签: html css twitter-bootstrap-3