XML technologies / CSS / CSS Cookbook / General principles / CSS in Adobe Dreamweaver

(Excerpt from “CSS Kochbuch” by Christopher Schmitt)

Problem

You use Adobe Dreamweaver to create and edit web pages and want to use its CSS features.

Solution

Use the tab CSS-STILE to create, edit, delete and view CSS styles (see the next two figures).

Creating a new CSS file in Dreamweaver

Figure: Creating a new CSS file in Dreamweaver.

Editing styles in a CSS file with Dreamweaver

Figure: Editing styles in a CSS file with Dreamweaver.

There are several ways to work with stylesheets:

  1. To attach stylesheets to any HTML document, you can also click the icon STYLESHEET ANFÜGEN in the tab CSS-STILE (see the following figure).

Using Dreamweaver’s CSS tab to attach an external stylesheet

Figure: Using Dreamweaver’s CSS tab to attach an external stylesheet.

  1. To create a CSS document, choose DATEI ➝ NEU…. In the next window (see the first figure), select the entry in the second column (EINFACHE SEITE): CSS.

  2. Edit your web page like a Word document. Dreamweaver automatically maintains an internal stylesheet with the required definitions in the background.

  3. Enter your style definitions in split view or code view.

You can display CSS properties grouped into categories such as font, background and border, or in an alphabetical list.

Discussion

When you apply styles to a document’s HTML in Dreamweaver through the palette EIGENSCHAFTEN, they are automatically added as definitions in an internal stylesheet instead of using obsolete tags font (see the following figure). Older Dreamweaver versions would instead have generated code like this:

<font face="georgia, times new roman, serif" color="#ff0000" size="2">Dies ist Text!</font>

Choosing font properties and colors automatically creates styles in Dreamweaver

Figure: Choosing font properties and colors automatically creates the required styles in Dreamweaver.

The CSS tab also lets you view the styles created by Dreamweaver (see the following figure).

Viewing the current element’s styles in Dreamweaver’s CSS tab

Figure: Viewing the current element’s styles in Dreamweaver’s CSS tab.

See also

The Adobe Dreamweaver home page.

  

 

 

 

back to top