Cascading Style Sheets (CSS) are a series of formatting rules that control the appearance of Web page content. When you use CSS to format page formats, content and presentation are separated from each other. The page content (HTML code) is in its own HTML file, and the CSS rules that define the code representation are located in another file (an external style sheet) or another part of the HTML document (typically
The term "cascade" refers to the ability to apply multiple styles to the same element or Web page. For example, you can create a CSS rule to apply a color, create another rule to apply the margins, and then apply both to the same text on a page. The styles you define "cascade" to the elements on your Web page and ultimately create the design you want.
CSS style sheet creation, you can customize the size of the page text, font, color, border, link state, and other effects. In Dreamweaver 8, CSS style settings have been greatly improved, more convenient, practical and fast.
First, create CSS styles
1. Select Menu "Window" > "CSS Style". Open the CSS style panel.
2, click the new CSS Rule button in the lower-right corner of the CSS styles panel to open the New CSS Rule dialog box.
In the selector type option, you can choose to create a CSS style that includes the following three ways:
Class: We can apply class styles to any area or text in the document window, and if you apply a class style to an entire piece of text, the class attribute appears in the corresponding label, which is the name of the class style.
Label (redefine the appearance of a particular label): redefine the default format for HTML tags. We can define a cascading style sheet for one label, meaning that the cascading style sheet defined will apply only to the selected label. For example, we define cascading style sheets for <body> and </body> tags, so all content contained in <body> and </body> labels will follow the defined cascading style sheet.
Advanced (ID, pseudo-class selector, etc.): Defines cascading style sheets for a specific combination label, using IDs as attributes to ensure that the document has a unique value available. An advanced style is a special type of style that is commonly used in 4 different ways: