O'Reilly logo

Dreamweaver MX: The Missing Manual by David Sawyer McFarland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Styles

Once you’ve created styles, applying them is easy. In fact, if you created HTML tag styles, you needn’t do anything to apply them, because their selectors (see the box on page 239) automatically dictate which tags they affect.

Linking to an External Style Sheet

Whenever you create an external style sheet, Dreamweaver automatically links it to the current document. To use its styles in a different Web page, however, you must attach it to the page.

To do so, open the Web page to which you wish to add the style sheet. Click the Attach Style Sheet button (see Figure 8-1) on the CSS Styles panel. (If the CSS Styles panel isn’t open, choose Window CSS Styles or press Shift-F11.)

The Link External Style Sheet window appears. Click the Browse button. In the Select Style Sheet File dialog box that appears, navigate to and double-click the CSS (.css) file you wish to attach to the document. If Dreamweaver offers to copy the style sheet file into your site’s root folder, click Yes.

The Link External Style Sheet window provides two other options: Link or Import. These two choices are nearly identical; they’re simply two different methods of attaching an external style sheet to a Web page. The only real difference is that Netscape Navigator 4 doesn’t understand the Import method. For greatest compatibility, use the Link option.

Tip

Some sneaky Web developers take advantage of Netscape Navigator 4’s inability to understand the Import method. Since Netscape 4 doesn’t display many CSS

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required