一个img下划线 - firefox bug ?? [英] a img underline - firefox bug??

查看:63
本文介绍了一个img下划线 - firefox bug ??的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅 http://services.ccagroup.co.uk/testlink。 html

这是有效的html 4.01过渡期。

它包含6个链接:A1-A3和B1-B3。

A没有(默认)样式,B有a img.nound {text-decoration:

none; border:none; }


链接1是图像+文本 - 这有问题 - 为什么图像

加下划线?我如何修复它?

链接2只是图像 - 这很好。

链接3只是文本 - 也没关系。


这种情况​​发生在Firefox 1.5的winxp& mac。

在ie6中不会发生。

部分doctype(怪癖模式)不会发生。

我可以在bugzilla上找不到它。

这是一个bug吗?

是否有解决方法或修复?


谢谢

克里斯

See http://services.ccagroup.co.uk/testlink.html
It''s valid html 4.01 transitional.
It contains 6 links: A1-A3, and B1-B3.
A is with no (default) style, B has "a img.nound { text-decoration:
none; border: none; }".

Link 1 is image + text - this has the problem - why is the image
underlined ? How do I fix it ?
Link 2 is just image - this is fine.
Link 3 is just text - also fine.

This happens in Firefox 1.5 on winxp & mac.
Doesn''t happen in ie6.
Doesn''t happen with a partial doctype (quirks mode).
I can''t find it on bugzilla.
Is it a bug ?
Is there a workaround, or fix ?

Thanks
Chris

推荐答案




Chris Sharman写道:


Chris Sharman wrote:
请参阅 http://services.ccagroup.co .uk / testlink.html
它是有效的html 4.01过渡。
它包含6个链接:A1-A3和B1-B3。
A是没有(默认)样式,B有一个img.nound {text-decoration:
none; border:none; }"。
See http://services.ccagroup.co.uk/testlink.html
It''s valid html 4.01 transitional.
It contains 6 links: A1-A3, and B1-B3.
A is with no (default) style, B has "a img.nound { text-decoration:
none; border: none; }".




我认为问题就在于你(不必要地)试图评论你的CSS规则,你有r />

< style type =" text / css"><! -

a img.nound {text-decoration:none; border:none; }

// - >

< / style>

和//语法不正确,可能用

JavaScript开始发表评论。


只需使用


< style type =" ; text / css">

a img.nound {text-decoration:none; border:none; }

< / style>


希望问题消失,因为Mozilla应该应用

样式(它是由于我认为的语法错误目前不行。

-


Martin Honnen
http://JavaScript.FAQTs.com/


Martin Honnen写道:
Martin Honnen wrote:


Chris Sharman写道:


Chris Sharman wrote:
参见 http://services.ccagroup.co.uk/testlink.html
这是有效的HTML 4.01过渡期。 A没有(默认)样式,B有a img.nound {text-decoration:
none; border:none; }。
See http://services.ccagroup.co.uk/testlink.html
It''s valid html 4.01 transitional.
It contains 6 links: A1-A3, and B1-B3.
A is with no (default) style, B has "a img.nound { text-decoration:
none; border: none; }".



我认为问题在于你(不必要地)尝试评论你的CSS规则,你有

< ; style type =" text / css"><! -
一个img.nound {text-decoration:none; border:none; }
// - >
< / style>

和//在语法上不正确,可能会用
JavaScript开始评论但不是CSS。



I think the problem is the way you (unnecessarily) try to comment out
your CSS rules, you have

<style type="text/css"><!--
a img.nound { text-decoration: none; border: none; }
// -->
</style>

and // is not syntactically correct, that might start a comment with
JavaScript but not with CSS.




验证。我现在忘记了哪个石器时代浏览器需要它。

你的建议用 http://services.ccagroup.co.uk/testlink2.html

没有任何区别 - 仍然错误地强调了图像。


谢谢

克里斯



It validates. I forget now which stone age browser needs it.
Your suggestion coded in http://services.ccagroup.co.uk/testlink2.html
No difference whatsoever - still wrongly underlines the images.

Thanks
Chris





Chris Sharman写道:



Chris Sharman wrote:

验证。我现在忘了哪个石器时代的浏览器需要它。


Mozilla抱怨它,我认为是正确的。如果你真的认为

你需要为像Netscape 3这样的浏览器评论一下,那么只需要使用<! - - >这个//就没有地方了。在一个样式元素中。

您的建议用编码http://services.ccagroup.co.uk/testlink2.html
没有任何区别 - 仍然错误地强调了图像。
It validates. I forget now which stone age browser needs it.
Mozilla complained about it, and rightly so I think. If you really think
you need to comment out stuff for browsers like Netscape 3 then simply
use <!-- -->, the // has no place inside of a style element.
Your suggestion coded in http://services.ccagroup.co.uk/testlink2.html
No difference whatsoever - still wrongly underlines the images.




是,右边,Mozilla控制台中的错误信息不再出现




至于带下划线的链接,这是一个设置的偏好设置Mozilla然后

Mozilla遵循CSS 2.1规范进行文本修饰,在< http://www.w3.org/TR/CSS21/text上说

。 html#lining-striking-props>:


"内联框上的文字装饰画在整个元素上,

遍历任何后代元素而不付费任何关注

他们的存在。后代元素上的'text-decoration''属性

对元素的装饰没有任何影响。


一旦链接获得一个文字装饰作为下划线它没有帮助

尽量避免像img这样的后代元素的下划线。

-


Martin Honnen
http://JavaScript.FAQTs.com/


这篇关于一个img下划线 - firefox bug ??的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆