Learning Standard -- Notes _ experience exchange

Source: Internet
Author: User
Learning Standards-notes:
1. if an object has float, width is basically not used.
2. Sometimes there are requirements on the Writing sequence of p. Write float first.
3. Finally, I understand why IE is so annoying.

An example of three columns: Adaptive middle column
There is a problem here, that is, there will be a small gap between the three columns, which is not available in FF, so if you want to form a continuous effect, you can define the background in main.

<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Strict // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "/> <style type =" text/css "> <! -- # Left {float: left; width: 200px; height: 200px; background: orange;} # middle {height: 200px; background: # eee;} # right {float: right; width: 200px; height: 200px; background: black ;} --> </style> <p id = "main"> <p id = "left"> </p> <p id = "right"> </p> <p id = "middle"> </p>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]


Center the page vertically

<Style> # test {width: 100px; height: 100px; position: absolute; left: 50%; top: 50%; margin:-50px 0 0-50px; background-color: #000} </style> <p id = "test"> </p>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

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.