Solve the bug that IE6 does not support position: Fixed fixed positioning (reprinted fan duck)

Source: Internet
Author: User

Http://blog.funya.in/csscss3/ie6-fixed-bug/

Position: fixed; in IE6: Fixed browser Headers
. Fixed_top {position: fixed; top: 0px;} * HTML. fixed_top/* IE6 head fixed */{position: absolute; bottom: auto; top: expression(eval(document.doc umentelement. scrolltop ));}
Fixed at the bottom of the browser
. Fixed_bottom {position: fixed; bottom: 0px;} * HTML. fixed_bottom/* fixed at the bottom of IE6 */{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 or at the top, and can be used with margin to control the position of the element.

There are two more, fixed on the left and fixed on the right.
. Fixed_left {position: fixed; Right: auto; left: 0px;} * HTML. fixed_left/* fixed on the left side of IE6 */{position: absolute; Right: auto; left: expression(eval(document.doc umentelement. scrollleft ));}. fixed_right {position: fixed; Right: 0px; left: auto;} * HTML. fixed_right/* fixed to the right of IE6 */{position: absolute; Right: auto; left: expression(eval(document.documentelement.scrollleft;document.doc umentelement. clientWidth-this.offsetWidth)-(parseint (this. currentstyle. marginleft, 10) | 0)-(parseint (this. currentstyle. marginright, 10) | 0 ));}
Solution to IE6 Jitter

When Page scrolling is implemented, fixed positioning elements flash in IE6.

Solution:
* html,* html body {background-image:url(about:blank);background-attachment:fixed;}

Or

.* html,* html body { _text-overflow:ellipsis; }

Solve the bug that IE6 does not support position: Fixed fixed positioning (reprinted fan duck)

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.