Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to master CSS cascading style sheets with Dreamweaver8

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to use Dreamweaver8 to master CSS cascading style sheets". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use Dreamweaver8 to master CSS cascading style sheets".

How to master CSS cascading style sheets with Dreamweaver8

CSS allows you to control many properties that HTML cannot control alone. For example, you can specify different font sizes and units (pixels, points, and so on) for selected text. By using CSS to set the font size in pixels, you can also ensure that page layout and appearance are handled in a more consistent manner across multiple browsers.

In addition to formatting text, you can use CSS to control the formatting and positioning of block-level elements in Web pages. For example, you can set the margins and borders of block-level elements, floating text around other text, and so on.

The CSS formatting rule consists of two parts: selector and declaration. Selectors are terms that identify formatting elements, such as P, H1, class name, or ID, and declarations are used to define element styles. In the following example, H1 is the selector and everything between parentheses ({}) is a declaration:

H1 {

Font-size:16 pixels

Font-family:Helvetica

Font-weight:bold

}

The declaration consists of two parts: attributes (such as font-family) and values (such as Helvetica). The above CSS rule creates a specific style for H1 tags: the text of all H1 tags linked to this style will be 16 pixels, Helvetica font, and bold.

The term cascading refers to the ability to apply multiple styles to the same element. For example, you can create one CSS rule to apply colors, another CSS rule to apply margins, and then apply both to the same text on the page. The defined styles are "cascaded" down to the elements on your Web page, and eventually create the design you want.

How to master CSS cascading style sheets with Dreamweaver8

The main advantage of CSS is that it provides convenient update capabilities; when you update a CSS rule in one place, the formatting of all documents that use that defined style are automatically updated to the new style.

The following style types can be defined in Dreamweaver:

Custom CSS rules, also known as class styles, enable you to apply style attributes to any text range or block of text. (see apply class styles.)

The HTML label style redefines the format of specific tags, such as H2. When you create or change the CSS style of an H2 tag, all text formatted with the H2 tag is updated immediately.

The CSS selector style (advanced style) redefines the formatting of a specific combination of elements, or redefines the formatting of other selector forms that CSS allows (for example, the selector td H3 is applied whenever the h3 header appears in the table cell). Advanced styles can also redefine formatting for tags that contain specific id attributes (for example, styles defined by # myStyle can be applied to all tags that contain attribute value pairs id= "myStyle").

CSS rules can be located in the following locations:

An external CSS stylesheet is a series of CSS rules stored in a separate external CSS (.css) file (not an HTML file). Using the link in the header section of the document, the file is linked to one or more pages in the Web site.

An internal (or embedded) CSS stylesheet is a series of CSS rules contained in the style tag in the header of an HTML document.

Inline styles are defined within the entire HTML document in a specific instance of the tag.

Dreamweaver recognizes styles defined in existing documents, as long as they conform to CSS style guidelines.

Hint

To display the O'Reilly CSS reference guide included in Dreamweaver, select help > reference, and then select O'Reilly CSS reference from the pop-up menu in the reference panel.

Manually set HTML formatting overrides formatting applied through CSS. For CSS rules to control paragraph formatting, you must remove all manual HTML formatting.

Dreamweaver renders most of the style properties that you apply directly in the document window. You can also preview the document in the browser window to see how the style is applied. Some CSS style properties appear differently in Microsoft Internet Explorer, Netscape Navigator, Opera, and Apple Safari, and some are not currently supported by any browsers.

Thank you for reading, the above is the content of "how to use Dreamweaver8 to master CSS cascading stylesheets". After the study of this article, I believe you have a deeper understanding of how to master CSS cascading stylesheets with Dreamweaver8, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report