
275
Building Style Sheet Web Pages
7
Finally, you can use the CSS Styles panel itself to apply a style:
1. Select the tag or text to which you want to apply your style.
2. In the CSS Styles panel, right-click (Control+click) the style and choose Apply from the
context menu.
Dreamweaver supports multiple classes for rendering purposes, but there is no method
except hand-coding to apply more than one class to a tag.
Changing styles
Changing from one applied custom style to another is extremely straightforward in Dreamweaver.
Just place your cursor anywhere within the styled text and select a different custom style from the
Class list on the Property inspector. Dreamweaver changes the old style to the new instantly. You get
the same results if you switch styles from the Tag Selector or use the menus.
But what if you want to apply a new style to a text range within an existing
<span> tag? Dream-
weaver, by design, avoids nested
<span> tags. Here’s how it works. Suppose that you’re working
with the following code:
<span class=”bodyCopy”>Developing strategies to survive requires industry i
insight and forward thinking in this competitive marketplace.</span>
If you apply a custom style called hype to the phrases industry insight and forward thinking by first
selecting those phrases and then choosing
hype from the Class list, the code looks like this:
<span class=”bodyCopy”>Developing strategies ...