【问题标题】:Problem with spacing after anchor tag in IE6 and IE7IE6和IE7中锚标记后的间距问题
【发布时间】:2011-06-25 03:03:21
【问题描述】:

我在 IE6 和 IE7 中的链接有问题(它们在 IE8 中运行良好)。 HTML 是正确的并且没有不必要的空格,但 IE 没有删除链接文本末尾之间的空格 - 它直接运行到连续的段落文本中。

我已经无休止地搜索,但找不到解决方案。有什么建议吗?

【问题讨论】:

  • 您可以发布您的链接之一的源代码吗?
  • a, .art-post li a { text-decoration: none;颜色:#2C9325; } a:link, .art-post li a:link { text-decoration: none;颜色:#2C9325; } a:visited, a.visited, .art-post li a:visited, .art-post li a.visited { color: #2C9325; } a:hover, a.hover, .art-post li a:hover, .art-post li a.hover { text-decoration: underline;颜色:#2C9325; }
  • 链接上的html是:

    咨询和治疗可以在您舒适的家中或当地诊所进行。请求咨询电子邮件enquiries@website domain 或致电。

  • 您需要制作一个可重现的演示并将其粘贴在JS BinjsFiddle 上。

标签: internet-explorer-7 internet-explorer-6 anchor spacing


【解决方案1】:

这很奇怪。只要锚点的 href 以“mailto:”开头,锚点与其旁边的文本之间的空格就会被删除。

使用 mootools 是我解决问题的方法:

if (Browser.ie6 || Browser.ie7){$$('a[href^=mailto:]').setStyle("margin-right", "0.3em");}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-20
    • 1970-01-01
    • 1970-01-01
    • 2011-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多