:
Solution:
1. When scaling the form, the blank width on the left of the content is obtained first.
$ ("# Nav"). offset (). left.
2. Get the width of the entire form (Note: The desktop resolution is the benchmark and is missing ).
3. Use the width of the desktop resolution-the width of the page content area/2 to obtain the Extra width of one side.
4. If the obtained value is different from $ ("# nav"). offset (). left;, the two values can be adjusted to the same value.
Copy codeThe Code is as follows:
Var ietest = function ()
{
If ($. browser. msie ){
If ($. browser. version = "6.0 ")
{
Var _width1_document.doc umentElement. clientWidth + 29; // desktop resolution size
$ ("# Nav" ).css ("left", (_ width-950)/2)-15); // reset the value
Return false;
}
Return false;
}
Return false;
}
Window. onresize = ietest; // event triggered when the form is scaled