html - 删除 Bootstrap 输入插件中文本的最后一个边距

标签 html css twitter-bootstrap

我试图在 Bootstrap 的“输入插件”上删除文本的最后一个边距。

我借了一把 fiddle :
http://jsfiddle.net/Dzhz4/250/

HTML

<div class="input-group">
  <div class="input-group-addon">Lit:</div>
    <input type="text" style="width: 40px" class="form-control input-sm"/>';
</div>';

CSS

.input-group-addon {
  max-width:30px;
  text-align:left !important;
}

编辑
我学会了,我需要填充。不是 margin 。

最佳答案

这是填充而不是边距

.input-group-addon {
  min-width: 300px;
  text-align: left;
  padding-left: 0;
}

http://jsfiddle.net/Dzhz4/252/

使用 Chrome 开发工具之类的工具对于查找此类内容非常有用。我建议学习如何使用元素检查器作为起点。

关于html - 删除 Bootstrap 输入插件中文本的最后一个边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34137133/

相关文章:

jquery - Bootstrap - 在导航栏上添加带有滚动箭头的滑动菜单

html - div 内的表格将 div 水平拉伸(stretch)超过 100%

html - 如何去除 &lt;header&gt; 标签的边框?

html - CSS 位置 :fixed element and margins

javascript - 只有在输入被证明不正确后,如何才能使文本字段突出显示为红色?

html - 在图像上放置按钮 Bootstrap CSS

html - 如何使用嵌套 <ul> 设置水平子菜单的样式

javascript - 如何在初始加载和使用哪个类时将 Bootstrap 组件(容器)扩展到全窗口宽度和高度?

html - cakephp CSS问题

html - 背景视频未集中在 Bootstrap 单元中