IE6错误与代码问题 [英] IE6 bug vs. Code Problem
问题描述
嗨。 。 。
我是CSS新手,刚刚开始铺设我的第一个免费的
网站;它既令人沮丧又有回报。
我遇到的东西在Firefox / Opera中表现不错,但没有
IE6(喘气) ,震惊,惊讶) - 但我不确定我正在做的事情是否有什么东西是错误的,因为我在这方面很陌生。我没有能够找到问题我已经在
IE6错误列表中的其他地方描述了这个问题。
无论如何,这里是如何复制问题:
< html>
< head>
< style>
#test {color:green;}
#test.apple {color:red;}
#test.banana {color:yellow;}
< / style>
< / head>
< body>
< div id =" test"> TEST< / div--渲染好(绿色)
< div id = "试验" class =" apple"> TEST< / div--渲染正常(红色)
< div id =" test" class =" banana"> TEST< / div--在IE6中没有工作(绿色)
< / body>
< ; / html>
我做错了什么?
Hi . . .
I''m new to CSS, and have just started laying out my first table-free
site; it''s been both frustrating and rewarding.
I''ve come across something that renders okay in Firefox/Opera, but not
IE6 (gasp, shock, amazement) -- but I''m not sure if there''s something
wrong with what I''m doing, as I''m pretty new at this. I haven''t been
able to find the problem I''m having described elsewhere in the lists of
IE6 bugs.
Anyhow, here''s how to duplicate the problem:
<html>
<head>
<style>
#test {color:green;}
#test.apple {color:red;}
#test.banana {color:yellow;}
</style>
</head>
<body>
<div id="test">TEST</div-- renders okay (green)
<div id="test" class="apple">TEST</div-- renders okay (red)
<div id="test" class="banana">TEST</div-- DOESN''T WORK in IE6 (green)
</body>
</html>
Am I doing something wrong?
推荐答案
ram写道:
ram wrote:
嗨。 。 。
我是CSS新手,刚刚开始铺设我的第一个免费的
网站;它既令人沮丧又有回报。
我遇到的东西在Firefox / Opera中表现不错,但没有
IE6(喘气) ,震惊,惊讶) - 但我不确定我正在做的事情是否有什么东西是错误的,因为我在这方面很陌生。我没有能够找到问题我已经在
IE6错误列表中的其他地方描述了这个问题。
无论如何,这里是如何复制问题:
< html>
< head>
< style>
#test {color:green;}
#test.apple {color:red;}
#test.banana {color:yellow;}
< / style>
< / head>
< body>
< div id =" test"> TEST< / div--渲染好(绿色)
< div id = "试验" class =" apple"> TEST< / div--渲染正常(红色)
< div id =" test" class =" banana"> TEST< / div--在IE6中没有工作(绿色)
< / body>
< ; / html>
我做错了什么?
Hi . . .
I''m new to CSS, and have just started laying out my first table-free
site; it''s been both frustrating and rewarding.
I''ve come across something that renders okay in Firefox/Opera, but not
IE6 (gasp, shock, amazement) -- but I''m not sure if there''s something
wrong with what I''m doing, as I''m pretty new at this. I haven''t been
able to find the problem I''m having described elsewhere in the lists of
IE6 bugs.
Anyhow, here''s how to duplicate the problem:
<html>
<head>
<style>
#test {color:green;}
#test.apple {color:red;}
#test.banana {color:yellow;}
</style>
</head>
<body>
<div id="test">TEST</div-- renders okay (green)
<div id="test" class="apple">TEST</div-- renders okay (red)
<div id="test" class="banana">TEST</div-- DOESN''T WORK in IE6 (green)
</body>
</html>
Am I doing something wrong?
不,它确实是一个错误,IE6多类错误:
http://sonspring.com/index.php?id=102
-
Els http://locusmeus.com/
无障碍网页设计: http://locusoptimus.com/
No, it really is a bug, the "IE6 multi-class bug":
http://sonspring.com/index.php?id=102
--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
ram写道:
ram wrote:
嗨。 。 。
我是CSS新手,刚刚开始铺设我的第一个免费的
网站;这既令人沮丧又有益。
Hi . . .
I''m new to CSS, and have just started laying out my first table-free
site; it''s been both frustrating and rewarding.
[...]
[...]
< body>
< ; div id =" test"> TEST< / div--渲染正常(绿色)
< div id =" test" class =" apple"> TEST< / div--渲染正常(红色)
< div id =" test" class =" banana"> TEST< / div--在IE6中没有工作(绿色)
< / body>
< ; / html>
我做错了什么?
<body>
<div id="test">TEST</div-- renders okay (green)
<div id="test" class="apple">TEST</div-- renders okay (red)
<div id="test" class="banana">TEST</div-- DOESN''T WORK in IE6 (green)
</body>
</html>
Am I doing something wrong?
您的HTML无效,ID必须在文档中唯一。
-
Fred
Your HTML is invalid, IDs must be unique in the document.
--
Fred
感谢您的帮助 - 很高兴知道这是一个确定的错误。
我最终使用了上面链接中推荐的相同解决方法。
我发布的代码实际上只是为了复制问题;真正的
html只有一个带有id的div,并且类改为
javascript - 同样的难度出现了。
在花了一天时间尝试用CSS编写代码之后,我有了一个全新的
,感谢设计师为什么不喜欢IE6。
再次感谢。
Fred写道:
Thanks for your help -- it''s good to know that it''s an identified bug.
I ended up using the same workaround recommended on the link above.
The code I posted was actually just to duplicate the problem; the real
html has only one div with the id, and the class is changed with
javascript -- same difficulty arises.
After spending the day trying to code with CSS, I have a whole new
appreciation of why designers dislike IE6 so much.
Thanks again.
Fred wrote:
ram写道:
ram wrote:
嗨。 。 。
我是CSS新手,刚刚开始铺设我的第一个免费的
网站;这既令人沮丧又有益。
Hi . . .
I''m new to CSS, and have just started laying out my first table-free
site; it''s been both frustrating and rewarding.
[...]
[...]
< body>
< ; div id =" test"> TEST< / div--渲染正常(绿色)
< div id =" test" class =" apple"> TEST< / div--渲染正常(红色)
< div id =" test" class =" banana"> TEST< / div--在IE6中没有工作(绿色)
< / body>
< ; / html>
我做错了什么?
<body>
<div id="test">TEST</div-- renders okay (green)
<div id="test" class="apple">TEST</div-- renders okay (red)
<div id="test" class="banana">TEST</div-- DOESN''T WORK in IE6 (green)
</body>
</html>
Am I doing something wrong?
您的HTML无效,ID必须在文档中唯一。
-
Fred
Your HTML is invalid, IDs must be unique in the document.
--
Fred
这篇关于IE6错误与代码问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!