Understand the CSS layout rules of Dreamweaver CS3

Source: Internet
Author: User
Tags dreamweaver

Compared with the previous version, Dreamweaver CS3 is more standardized for CSS writing. Let's take a look at its CSS layout rules.CSS file link

· Additional link: external CSS file

· Import CSS: when multiple CSS files are frequently used, multiple CSS files are imported into one CSS file.

There are three types of CSS rule definitions:

1) classes such as ". RedText", ". BlueText", and ". BigText"

2) Tag re-CSS definition for the original HTML Tag

3) Advanced pseudo classes, elements defining IDs, and comprehensive definitions

CSS rule application

· Only the "class" style needs to be applied, class = "xxxx ". Any element can be applied to classes.

· Differences between class and id

· Tag applications are generally used at one time for "body" tags. It is not recommended to define tags that are highly repetitive on pages, such as "li" and "td.

· It is much better to define "# id li" than to define "li.

Execution sequence of CSS rules

· Follow the sequence of CSS Code Execution

· If there are repeated rules, follow the subsequent execution Definition

· The final rule is a combination of multiple defined rules

Key: Advanced rule Definition

1. Define text styles for different tables. (Use different IDs and class style definitions for different tables)

2. Definition of multiple hyperlink styles on the first page

3. Multiple CSS definitions for different objects with the same rules

4. Which of the following is more scientific (scalability and code streamlining) for multiple CSS methods defined for the same object)


Figure 1 create a CSS rule in Dreamweaver

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.