Traditional table layout and CSS layout [original]

Source: Internet
Author: User

The traditional table layout method utilizes the zero border feature of all the table elements in HTML. When a table element is displayed, the cell border and spacing are set to 0, that is, the border is not displayed. Therefore, after dividing the elements in the webpage by layout, they are placed in cells of the table to achieve a complex typographical combination.

<Table width = 600 border = "1" cellspacing = "3" cellpadding = "3">
<Tr>
<TD width = "51%" rowspan = "2" background = "# 000fff"> <font color = "blue"> text display </font> </TD>
<TD width = "30%" background = "# 000fff"> & nbsp; </TD>
<TD width = "19%" background = "# 000fff"> & nbsp; </TD>
</Tr>
</Table>

Complex table design makes the design difficult and the modification more complex. In addition to the code of the table itself, the code generated for the webpage contains many redundant transparent GIF bitmaps and other elements, as a result, the download and resolution speed of the browser is slow.

CSS layout, using Div, div can be understood as a layer or a block. The DIV function is only used to mark a piece of information for later style definitions.

Currently, the popular Div + CSS, div considers data, CSS is responsible for style, easy to modify, and easy to operate.

Related Article

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.