Adobe 38028779 User Guide - Page 255
About conflicting styles, Using the CSS Styles panel
UPC - 718659742201
View all Adobe 38028779 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 255 highlights
About conflicting styles When you apply two or more CSS styles to the same text, the styles may conflict and produce unexpected results. Browsers apply style attributes according to the following rules: • If two styles are applied to the same text, the browser displays all attributes of both styles unless specific attributes conflict. For example, one style may specify blue as the text color and the other style may specify red. • If attributes from two styles applied to the same text conflict, the browser displays the attribute of the innermost style (the style closest to the text itself ). • If there is a direct conflict, the attributes from CSS styles (styles applied with the class attribute) overrule attributes from HTML tag styles. In the example that follows, the style defined for h1 might specify the font, size, and color for all h1 paragraphs, but the custom CSS style .Blue applied to this paragraph overrules the color setting in the H1 style. The second custom CSS style .Red overrules .Blue because it is inside the .Blue style. This paragraph is controlled by the .Blue custom style and h1 HTML tag style.Except this sentence is controlled by the .Red style. Now we're back to the .Blue style. Using the CSS Styles panel Use the CSS Styles panel to apply custom CSS styles to the current selection. The CSS Styles panel displays custom (class) CSS styles only; redefined HTML tags and CSS selector styles do not appear in the CSS Styles panel, because they are automatically applied to any text controlled by the specified tag or selector. (If you want to simply cut and paste reusable but not updatable and customizable styles, use the HTML Styles panel.) Choose Window > CSS Styles to display the CSS Styles panel. Apply displays the tag of the current selection. Choose a tag from the pop-up menu to select a different tag. New Style opens the New Style dialog box. Create a new style for a particular document or create a new external style sheet. Attach Style Sheet opens the Select Style Sheet File dialog box. Select an external style sheet to attach to your current document. Edit Style Sheet opens the Edit Style Sheet dialog box. Edit any of the styles in the current document or in an external style sheet. See also "Using CSS style sheets" on page 248. Note: Right-click (Windows) or Control-click (Macintosh) the CSS Styles panel to open a context menu that includes Edit, Duplicate, Delete, Apply New Style, Edit Style Sheet, and Attach Style Sheet commands. Inserting and Formatting Text 255