Div+css Fixed bottom floating ad

Source: Internet
Author: User

In the project. To address the problem of multiple browser compatibility. IE6 has a headache. Div often appears floating ....

Then find an example on the internet ....

The CSS code is as follows:

Body {background-image:url (text.txt);/* for IE6 */background-attachment:fixed;} #bottomNav {background-color: #096; z-index:999; position:fixed; bottom:0; left:0; width:100%; _position:absolute; * For IE6 * * _top:expression (documentelement.scrolltop + documentelement.clientheight-this.offsetheight); * for IE6 */overflow:visible; }

The HTML code is as follows:

<div id= "Bottomnav" > here Add your code to a fixed bottom float </div> need to be aware of where:

_top:expression (Documentelement.scrolltop + documentelement.clientheight-this.offsetheight);

See _top is for IE6 exclusive preparation, but when I only add the above sentence, IE6 pull the scroll bar to see the floating object is shaking-_-| | | Workaround we add such a statement for IE6:
Background-image:url (Text.txt);
Note here Text.txt actually do not need to have this TXT document, TXT file name what look like it, so we will solve the IE6 under the problem of easing.

_top:expression (Documentelement.scrolltop + documentelement.clientheight-this.offsetheight);

See _top is for IE6 exclusive preparation, but when I only add the above sentence, IE6 pull the scroll bar to see the floating object is shaking-_-| | | Workaround we add such a statement for IE6:

Background-image:url (Text.txt);

Note here Text.txt actually do not need to have this TXT document, TXT file name what look like it, so we will solve the IE6 under the problem of easing.

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.