IE6 double margin
When viewing in IE6, you will find that the left margin is 100 pixels, Which is expanded to 200 pixels, and the display: inline can be used;
. Floatbox {
Float: left;
Width: 150px;
Height: 150px;
Margin: 5px 0 5px 100px;
Display: inline;
}
Solution IE6 does not support position: fixed; Attribute
General position: fixed; Implementation Method
For example, the CSS code used by the <div id = "top">... </div> HTML element in the lower right corner is as follows:
# Top {
Position: fixed;
Bottom: 0;
Right: 10px;
}
To fix the <div id = "top">... </div> element at the bottom of the browser and 10 pixels to the right.
How to Implement position: fixed; in IE6
# Top {
Position: fixed;
_ Position: absolute;
Bottom: 0;
Right: 10px;
_ Bottom: auto;
_ Top: extends umentElement. clientHeight-this.offsetHeight-(parseInt (this. currentStyle. marginTop, 10) | 0)-(parseInt (this. currentStyle. marginBottom, 10) | 0 ))
);
The _ symbol in _ position: absolute; can only be identified by IE6 to distinguish other browsers.
Pin the element to the top of the browser:
# Top {
_ Position: absolute;
_ Bottom: auto;
_ Top: expression(eval(document.doc umentElement. scrollTop ));
}
Fix the element at the bottom of the browser:
# Top {
_ Position: absolute;
_ Bottom: auto;
_ Top: expression(eval(document.documentElement.scrollTop+document.doc umentElement. clientHeight-this.offsetHeight-(parseInt (this. currentStyle. marginTop, 10) | 0)-(parseInt (this. currentStyle. marginBottom, 10) | 0 )));
}
The two pieces of code can only be implemented at the bottom and the top. You can use _ margin-top: 10px; or _ margin-bottom: 10px; to modify the position of the numerical control element.
Position: fixed; flashing
After using the above method, we will find that the fixed positioning elements will flash when rolling the scroll bar. To solve the flash problem, add the following content to the CSS file:
* Html {
Background-image: url (about: blank );
Background-attachment: fixed;
}
* Is identified for IE6.
Solve ie compatibility with js
Make IE5 and IE6 compatible to IE7 mode (recommended)
<! -- [If lt IE 7]>
<Script src = "http://ie7-js.googlecode.com/svn/version/2.0 (beta)/IE7.js" type = "text/javascript"> </script>
<! [Endif] -->
Make IE5, IE6, and IE7 compatible with IE8 Mode
<! -- [If lt IE 8]>
<Script src = "http://ie7-js.googlecode.com/svn/version/2.0 (beta)/IE8.js" type = "text/javascript"> </script>
<! [Endif] -->
Make IE5, IE6, IE7, and IE8 compatible to IE9 Mode
<! -- [If lt IE 9]>
<Script src = "http://ie7-js.googlecode.com/svn/version/2.1 (beta4)/IE9.js"> </script>
<! [Endif] -->
Downgrade the IE version to 7.0
<Meta http-equiv = "X-UA-ompatible" content = "IE = EmulateIE7"/>
In addition;
<Meta http-equiv = "X-UA-Compatible" content = "IE = 7"/>