Use WEB standards to create two-column page la S

Source: Internet
Author: User

There is a belief in the use of Web standards for page design that the basic page layout is not performed using the table gram.
The common two-column layout of a webpage is usually achieved through a table with one row and two columns. For example:

The code is as follows: Copy code
<Table border = "0" width = "760">
<Tr>
<Td style = "width: 30%;"> left sidebar </td>
<Td style = "width: 70%;"> right column </td>
</Tr>
</Table>

You can also use the float attribute of the div object. The page code is as follows:

The code is as follows: Copy code
<Div id = "Container">
<Div id = "SideColumn"> left sidebar </div>
<Div id = "MainColumn"> right column </div>
</Div>
The supporting CSS code is:
# Container {
Width: 760px;
}
# SideColumn {
Width: 200px;
Float: left;
Border: 1px solid # 00F;
}
# MainColumn {
Width: 550px;
Float: right;
Border: 1px solid #000;
}

 

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.