The CSS specification allows you to create styles using abbreviated syntax, called shorthand CSS. Shorthand CSS allows you to specify the values of multiple properties with one property tag. For example, you can use the Font property to set the Font-style, Font-variant, Font-weight, Font-size, Line-height, and font-family properties in one line of syntax.
A key issue to note when using shorthand CSS is that the value omitted from the shorthand CSS property is specified as the default value for the property. When two or more CSS rules are assigned to the same label, this may cause the page to not display correctly.
For example, the H1 tag shown below uses the normal CSS syntax. Note that the values for the Font-variant, Font-stretch, Font-size-adjust, and Font-style properties 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
}
This tag is rewritten with a shorthand attribute:
H1 {font:bold 16pt/18pt Arial}
When written with shorthand notation, the omitted values are automatically specified as their default values. Thus, the shorthand example omits the font-variant, Font-style, Font-stretch, and font-size-adjust tags.
If you have defined styles in more than one location using shorthand and normal forms of CSS syntax (such as embedding styles in an HTML page and importing styles from an external style sheet), be sure to note that the omitted attributes may overwrite (or cascade) properties that are explicitly set in other locations.
As a result, Dreamweaver uses the normal form of CSS notation to compose syntax by default. This prevents potential problems that can be overridden by shorthand rules that are common rules. When you open a Web page in Dreamweaver that uses shorthand CSS notation to write code, be aware that Dreamweaver will create a new CSS rule using normal form. You can specify the CSS editing preferences in the CSS styles category in Windows for Edit > Preferences, and in the Macintosh as "Dreamweaver" > Preferences, by changing the Preferences dialog box, Dreamweaver how CSS rules are created and edited.
Attention
The CSS styles panel creates rules using only common symbols. If you use the CSS styles panel to create a page or CSS style sheet, it's important to know that manual encoding of shorthand CSS rules can cause shorthand properties to overwrite properties that are created in plain form. Therefore, create your style using normal CSS symbols.