Css bug: a strange phenomenon in IE6!

Source: Internet
Author: User

First, I declare that xpoint, a colleague of mine, encountered this problem, not the first employee. If you don't say this, I'm sure I will be stunned... when ID and Class are combined, they will not be displayed normally in IE6.
CSS code:

The code is as follows: Copy code
# F {font-size: 20px}
# F. a {color: red ;}
# F. B {color: black; font-size: 50px}
# F. c {color: blue ;}
# F. d {color: orange ;}

HTML code:

The code is as follows: Copy code
<Div id = "f" class = "a"> a </div>
<Div id = "f" class = "B"> B </div>
<Div id = "f" class = "c"> c </div>
<Div id = "f" class = "d"> d </div>

Imagine what IE will interpret it?
See the following running results:

The code is as follows: Copy code
# F {font-size: 20px}
# F. a {color: red ;}
# F. B {color: black; font-size: 50px}
# F. c {color: blue ;}
# F. d {color: orange ;}
A
B
C
D

[You can modify some code before running it to view the effect]
In fact, IE6 only recognizes the # f. a {color: red;} sentence, and the last three sentences are ignored.
We have to say that we are speechless and do not understand this.
(This phenomenon is normal in Firefox, Opera, and IE5)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.