HTML -- use a table for the layout of the page, html table page layout

Source: Internet
Author: User

HTML -- use a table for the layout of the page, html table page layout


<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 






How to Use tables to layout webpages

Let me talk about it with my web experience.

There are two existing layout methods for web design: table layout and CSS layout, which is strongly recommended by W3C. However, for the moment, table layout is still the first choice for most web designers because xhtml is not fully dominant.

The problem you described is a table alignment problem. There are several solutions:
If the two tables have different widths, select the default alignment mode, that is, left alignment. The labels and attributes in html are as follows: <table align = "left"> </table>. The problem you have now may be that the first table has an alignment mode, such as center alignment, and the second table has no alignment mode. Therefore, the default value is left alignment, in this way, the above problem occurs.

My experience in table layout:
1. table layout step 1: Insert a table with a width of 760-780px (Remember, you must use px instead of percentages). Do not set the height, and center the table. All future content will be restricted in this table.
2. proficient in Table nesting. That is to say, insert another table in one table. For example, divide the page you want to design into several major parts, and then use the number of rows and columns of the table to control their layout. If the content of a cell is further divided into several parts, you can continue to insert a table into this cell by using the same method as above.
3. Supplement: the border of the table must be 0, that is, the border attribute value in the table is "0 ". That is, to make the table invisible in the Web Page Preview, in order to achieve the purpose of table layout.

What else do you think. If you have any questions, ask again.

Html table layout

DW is so annoying that it is not used.
We recommend that you do not use the TABLE layout. Use the design layout to draw a TABLE that is large enough, and then draw the first column, which is larger than the image in width and height, and then insert the image, then adjust the cell size to the image size.

That is to say, if you define the width and width first, DW will automatically adjust according to the content, so it will change the layout. So you should first draw a cell that is large enough to add the content first, and then change the cell size.

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.