Double table method call style sheet _ CSS/HTML

Source: Internet
Author: User
The two-table method calls style sheets to design websites using web standards. The transition method mainly uses XHTML + CSS, and css style sheets are essential. This requires all web designers to be familiar with CSS. If you are not familiar with CSS before, start learning it now. To make a website that complies with the web standards, CSS cannot be designed with beautiful pages.

In fact, CSS is used to implement all the performance. We used to use table to locate and layout. Now we need to use DIV to locate and layout. This is a change in the way of thinking. Haha, any change will have resistance. To enjoy the "benefits" brought by standards, it is worthwhile to give up some old traditional practices.

External call style sheet

In the past, we used two methods to use a style sheet:

Page embedding: The style sheet is directly written in the head area of the page code. Similar to this:



External call method: Write the sample table in an independent .css file, and then use the code similar to the following in the page head area.



In the web-compliant design, we use the external calling method. You can change the page style by modifying the. CSS file without modifying the page. If all pages call the same style sheet file, you can change the style of all files by changing the style sheet file.

Two-table method call style sheet

View the original code on this page. You can see that the following two sentences are provided for calling the style sheet:




Why write twice?

In fact, it is enough to use the external method to call (that is, the first sentence. I use a double table call here as an example. The "@ import" command is used to input a style sheet. The "@ import" command is invalid in the netscape 4.0 browser. That is to say, when you want to hide some effects in the netscape 4.0 browser and display them in more than 4.0 or other browsers, you can use the "@ import" command to call the style sheet.

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.