Comparison of the pros and cons of transition from table to CSS _ Experience Exchange

Source: Internet
Author: User
The voice of the CSS layout advocates is being covered by the "Advantages of table layout" sound. A myth is that CSS is hard to learn. In fact, CSS is no more difficult than other web technologies. The problem is that web designers, who have been quite experienced in table design, have to abandon their thinking patterns to CSS methods instead.

I've been using a tabular layout for many years, and when I first started using CSS layouts, I was having problems. "How easy it is to use a table," I thought. But that's just because I'm used to the tables and I know how to handle them skillfully. Any change, even a small one, will make me feel trouble, not to mention such drastic changes.

Remembering the first time I learned to use a table layout, there was also a whole bunch of questions stuck around me. Think back to those Rowspans, Colspans, and Blank GIFs, which, to be fair, are more difficult to use with tabular layouts.

Another old point of view is that the CSS design page (number of bytes) is very large, larger than the table design page. The reason: Because you put all the style of the entire site in a file, when the user visited a page, the entire site style of the style sheet will need to download, so the page is very large.

So why do you want to put all the styles in a CSS file? No one limits you to use only one CSS file, you can create a separate sub-style sheet file for the detail style of a section. In my experience, from a simple manual site to a large database-driven, multi-functional system website, I have never used a single stylesheet file, and no home page code is more than a table design. Those table,tr,td tags occupy a lot of space, take action immediately, using CSS layout method to cut down your file size.

When you use a table layout, you lose the semantics of the label itself. The Web standard method layout separates the content and presentation layer and brings great benefits. When you use a table to lock your design, once you need to change it, you have to find this page, and then analyze the table structure, and then page by page changes, and CSS files can easily change the design of the entire site. With CSS, you don't have to think about device independence, regardless of the user's choice of their own style.

I also heard about the "benefits" of a table: designing forms. But forms can be arranged in any way. Is it for Netscape4? I have never heard of a reason to support such an old browser. Most mainstream browsers benefit much more than a handful of users who use browsers that do not support style sheets (not to mention CSS also supports plain text).

The idea of "super-table" supporters boils down to one thing: "Tables are easier." "It's nonsense!" If you are content with a inefficient approach, then you will. If you want to break through the restrictions, make the page content more general, easy to use, less code, then try to change it. Of course, if you are a newly-learned web design, you will not have these problems from the beginning.

"Chite", "This is just a tool in the designer's toolbox." This is the view of some of the speakers. Table layout like an old-fashioned wooden handle screwdriver, you can still use it to drill into a wall. And I would rather use an electric screwdriver, CSS layout more efficient, will not let my hands blisters.
  • 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.