How can I place a DIV in the lower right corner of another div ???, Put it in div

Source: Internet
Author: User

How can I place a DIV in the lower right corner of another div ???, Put it in div

How can I place a DIV in the lower right corner of another div ???

With the help of CSS positioning, you can place the DIV in the lower right corner in another DIV. The reference code is as follows:

<Div id = "box1">

<Div id = "box2"> test content </div>

</Div>

<Style> <! -- # Box1 {width: 600px; height: 600px; background: green; position: relative} # box1 # box2 {width: 200px; height: 200px; background: red; position: absolute; right: 0; bottom: 0} --> </style>

Parent objects are relatively located, and child objects are absolutely located based on parent objects;

The div of the outer layer is set to relative positioning, and the div of the inner layer is set to absolute positioning;

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.