CSS Style Memo

Source: Internet
Author: User

1. Set width using percent

<!DOCTYPE HTML Public "-//w3c//dtd XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "content-type"content= "text/html; charset=gb2312" /><title>AA25. Cn_ A column of adaptive widths</title><styletype= "text/css"><!--#layout{Border:2px solid #A9C9E2;Background-color:#E8F5FE;Height:200px;width:80%;} -</style></Head><Body><DivID= "layout">A column of adaptive widths (AA25. CN)</Div></Body></HTML>

2, Div Container Property settings, set container adaptive and Center.

margin:0px auto;

3. Div multi-column percent layout

<!DOCTYPE HTML Public "-//w3c//dtd XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "content-type"content= "text/html; charset=gb2312" /><title>Two-column width adaptive--aa25. CN</title><styletype= "text/css"><!--#left{Background-color:#E8F5FE;Border:1px solid #A9C9E2;float: left;Height:300px;width:20%;}#right{Background-color:#F2FDDB;Border:1px solid #A5CF3D;float: left;Height:300px;width:70%;} -</style></Head><Body><DivID= "left">Left column--(AA25. DNN</Div><DivID= "right">Right column--two column width adaptive (AA25. CN)</Div></Body></HTML>

CSS Style Memo

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.