CSS relative positioning

Source: Internet
Author: User
[Guide] CSS Absolute positioning allows you to pinpoint the location of a feature on a page, regardless of the location of other features on the page. Relative positioning refers to the position of the feature you are targeting relative to the location it is assigned in the file. Example: I {position:relative; left:40px; t

CSS absolute positioning allows you to pinpoint the location of a feature on a page, regardless of the location of other features on the page. Relative positioning refers to the position of the feature you are targeting relative to the location it is assigned in the file. Cases:


I {position:relative; left:40px; top:10px}


The key to relative positioning is that the position of the positioned feature is positioned relative to where it normally should be. If you stop using relative positioning, the position of the text will return to normal.

Be careful when using relative positioning, otherwise it is easy to make the page very messy.

In addition to relative positioning and absolute positioning, you can also use the static (static) parameter values. It is used in the same way as normal HTML, and cannot attach special positioning settings.

Isn't it good? Below we will learn how to control the elements that are positioned.

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.