【问题标题】:How can I control button margins using CSS (IE8 compatible)如何使用 CSS 控制按钮边距(兼容 IE8)
【发布时间】:2013-03-28 16:30:22
【问题描述】:

我正在尝试设置按钮样式,以使文本左侧/右侧的边距远小于默认样式。

例子:

如何使用与 IE8 兼容的 CSS 来做到这一点?

我试过了,但没有用(换行只是为了 MarkDown):

<button style="font-size=11px;
margin-right:1px;padding-right:1px;margin-left:1px;padding-left:1px;">
Copy parameters to another fund</button>

我知道我可以通过设置 width 属性来调整它,但为此我必须为每个不可扩展的不同文本设置单独的。

【问题讨论】:

    标签: css button internet-explorer-8 styles


    【解决方案1】:

    确保包含文档类型。这对我有用:

    <!doctype html>
    <body>
    <button style="font-size=11px;
          margin-right:1px;padding-right:1px;margin-left:1px;padding-left:1px;">
            Copy parameters to another fund
        </button>
    </body>
    

    实际上,你不需要边距,填充就可以了。

    【讨论】:

      猜你喜欢
      • 2010-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-10
      • 2018-01-07
      • 1970-01-01
      • 2013-09-08
      • 1970-01-01
      相关资源
      最近更新 更多