A detailed explanation of the position positioning of the page layout

Source: Internet
Author: User
Here is the layout of the page I give you position positioning, interested students can go to see.

When using Div+css for page layouts, the position positioning is understood as follows:

1. (current element) position:relative, not out of the layout of the document flow, relative to its own position of the offset, the original position when the white space after the element will not be filled, that is, the current element and the relative position of the subsequent elements (or the relative order) will not change, I generally understand that the order of the current element and subsequent elements will not change in any way.

2. (current Element) Position:absolute, out of the layout of the document flow, the original position when the white space is filled by the following elements, the starting position of the position is the parent element (position is not static) or body, Also, the position of the current element relative to the parent element or body is fixed, but subsequent elements may move to the front of the current element, which I generally understand is that the order of the current element and subsequent elements may change.

3. (current Element) position:fixed, similar to absolute, but does not change the position with the scroll bar movement (for example, some Web pages in the lower right corner of the ad, when the scroll bar, the position of the ad is unchanged), when the browser shrinks to this element is not visible, Scroll bars do not appear on the page.

4. (current element) position:static, default value.

Above is I organize to everyone's page layout position positioning, hope in the future will be helpful to everyone.

Related articles:

Detailed introduction to CSS page layout tips

Explain the basics of CSS in detail.

JQUERY+CSS3 implementation of the drop-down navigation menu function

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.