beautypg.com

About formatting text (css versus html), Edit css rules in the property inspector – Adobe Dreamweaver CC 2015 User Manual

Page 277

background image

270

Page content and assets

Last updated 6/3/2015

Note: When you create CSS inline styles, Dreamweaver adds style attribute code directly to the body of the page.

About formatting text (CSS versus HTML)

Formatting text in Dreamweaver is similar to using a standard word processor. You can set default formatting styles
(Paragraph, Heading 1, Heading 2, and so on) for a block of text, change the font, size, color, and alignment of selected
text, or apply text styles such as bold, italic, code (monospace), and underline.

Dreamweaver has two Property inspectors, integrated into one: the CSS Property inspector and the HTML Property
inspector. When you use the CSS Property inspector, Dreamweaver formats text using Cascading Style Sheets (CSS).
CSS gives web designers and developers greater control over web page design, while providing improved features for
accessibility and reduced file size. The CSS Property inspector lets you access existing styles, as well as create new ones.

Using CSS is a way to control the style of a web page without compromising its structure. By separating visual design
elements (fonts, colors, margins, and so on) from the structural logic of a web page, CSS gives web designers visual and
typographic control without sacrificing the integrity of the content. In addition, defining typographic design and page
layout from within a single, distinct block of code—without having to resort to image maps, font tags, tables, and spacer
GIFs—allows for faster downloads, streamlined site maintenance, and a central point from which to control design
attributes across multiple web pages.

You can store styles created with CSS directly in the document, or for more power and flexibility, you can store styles
in an external style sheet. If you attach an external style sheet to several web pages, all the pages automatically reflect
any changes you make to the style sheet. To access all CSS rules for a page, use the CSS Styles panel (Window > CSS
Styles). To access rules that apply to a current selection, use the CSS Styles panel (Current mode) or the Targeted Rule
pop-up menu in the CSS Property inspector.

If you prefer, you can use HTML markup tags to format text in your web pages. To use HTML tags instead of CSS,
format your text using the HTML Property inspector.

Note: You can combine CSS and HTML 3.2 formatting within the same page. Formatting is applied in a hierarchical
manner: HTML 3.2 formatting overrides formatting applied by external CSS style sheets, and CSS embedded in a
document overrides external CSS.

Edit CSS rules in the Property inspector

1

Open the Property inspector (Window > Properties), if it isn’t already open and click the CSS button.

2

Do one of the following:

• Place the insertion point inside a block of text that’s been formatted by a rule you want to edit. The rule appears

in the Targeted Rule pop-up menu.

• Select a rule from the Targeted Rule pop-up menu.

3

Make changes to the rule by using the various options in the CSS Property inspector.

Targeted Rule

Is the rule you are editing in the CSS Property inspector. When you have an existing style applied to

text, the rule affecting the text’s format appears when you click inside the text on the page. You can also use the
Targeted Rule pop-up menu to create new CSS rules, new in-line styles, or apply existing classes to selected text. If
you’re creating a new rule, you’ll need to complete the New CSS Rule dialog box. For more information, see the links
at the end of this topic.

Edit Rule

Opens the CSS Rule Definition dialog box for the targeted rule. If you select New CSS Rule from the

Targeted Rule pop-up menu and click the Edit Rule button, Dreamweaver opens the New CSS Rule definition dialog
box instead.

CSS Panel

Opens the CSS Styles panel and displays properties for the targeted rule in Current view.