Go to Dreamweaver8.0: shorthand CSS attributes

Source: Internet
Author: User
Tags dreamweaver
The CSS specification allows you to create a style using a simple syntax called shorthand CSS. Stenography CSS allows you to use an attribute label to specify the values of multiple attributes. For example, you can use the font attribute to set the font-style, font-variant, font-weight, font-size, line-height, and font-family attributes in a row syntax.

When using shorthand CSS, you must note that the omitted value of the shorthand CSS attribute will be specified as the default value of the attribute. When two or more CSS rules are specified for the same tag, this may cause the page to be incorrectly displayed.

For example, the H1 label shown below uses the common CSS syntax. Note that the values of the font-variant, font-stretch, font-size-adjust, and font-style attributes are specified as their default values.

H1 {font-weight: bold; font-size: 16pt; line-height: 18pt; font-family: Arial; font-variant: normal; font-style: normal; font-stretch: normal; font-size-adjust: none

}

The following uses a shorthand property to override this tag:

H1 {font: bold 16pt/18pt Arial}

When you write a stenographer, the omitted values are automatically specified as their default values. Therefore, the preceding stenography examples omit the font-variant, font-style, font-stretch, and font-size-adjust labels.

If you have defined styles in more than one position using the shorthand and common CSS syntax (for example, embedding styles in HTML pages and importing styles from external styles ), be sure that the omitted attribute may overwrite (or stack) the attribute explicitly set elsewhere.

Therefore, Dreamweaver uses the common form of CSS symbols to write the syntax by default. This prevents potential problems caused by stenographer rules that can cover general rules. When you open a Web page that uses the shorthand CSS symbol to write code in Dreamweaver, note that Dreamweaver will create a new CSS rule in the normal form. Change the "preferred parameter" dialog box (in Windows, edit ">" preferred parameter "; in Macintosh, Dreamweaver"> "preferred parameter ") in the "CSS style" category, you can specify how Dreamweaver creates and edits CSS rules.

Note:

The "CSS style" panel only uses common symbols to create rules. If you use the "CSS style" panel to create a page or CSS style sheet, you must be aware that manual encoding of the stenography CSS rule may cause the stenography property to overwrite the attributes created in the common form. Therefore, use common CSS symbols to create your style.
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.