IE6-IE9 compatibility problem list and solution _ Fill Missing two: CSS case sensitive, style height needs to add PX

Source: Internet
Author: User

After a period of practice, on the basis of "IE6-IE9 compatibility problem list and solution summary", then add 2 points:
Http://www.cnblogs.com/liuzhendong/archive/2012/04/09/2438502.html

 

Add in: Chapter 2: CSS, section 1: IE6-IE7 update

Details:

 

4. CSS styles are case sensitive.
As follows:CodeIn IE6, the CSS style class name is case-insensitive, but it is case sensitive from IE7. IE8 and ie9 are also case sensitive. That is to say, the CSS style class and the place where it is used, must be completely consistent.

<HTML>
<Head>
<Meta http-equiv = "X-UA-compatible" content = "Ie = 7"/>
<Style type = "text/CSS">
. Field
{
Background-color: Blue;/* ie 9 */
}
</Style>
</Head>
<Body>
<P class = "field"> This is for div1 </P>
<P style = "background-color: Blue"> This is for div2 </P>
</Body>
</Html>

 

5. In the style, the height and width must end with the input unit, such as PX.
The following code reads the height defined in style = 30 in IE6, but from IE7, the Unit PX must be added after Height: 30. Otherwise, the height value cannot be read.

<HTML>
<Head>
<Meta http-equiv = "X-UA-compatible" content = "Ie = 6"/>
<SCRIPT type = "text/JavaScript">
Function load1 (){
Alert (document. getelementbyid ("p1"). style. Height );
}
</SCRIPT>
</Head>
<Body onload = "load1 ()">
<P id = "p1" style = "background-color: Blue; Height: 30"> This is for div2 </P>
</Body>
</Html>

 

Related Article

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.