CSS Personal thinking

Source: Internet
Author: User

---restore content starts---

(1) Div By default is full line, if the set of float, he will not occupy the entire line, but only with the contents of the content of how much to display.

(2) If you want to set the two div to display on the same line, you only need to increase the float property, instead of setting the width of the outer div, he will automatically adapt to the open, and there is no need to set the width of the two div inside.

If the width of the outer div is set, and the width of the two div inside is greater than the outermost width, it will fall.

The best way to do this is to set the two Div property to the inline element.

This completely does not need to set up two div can be directly with span to do. Try not to use floating, there will be problems.

the layout of the time to adhere to the simpler the better, do not make very complicated, according to their own thinking to think.

(3) The drop-down menu can be set to the absolute position of the div inside Li so that it is out of the flow of the document and does not open the Li when displayed.

---restore content ends---

CSS Personal thinking

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.