Home > Products > Dreamweaver > Support > Using Cascading Style Sheets
Dreamweaver Icon Macromedia Dreamweaver Support Center - Using Cascading Style Sheets
Creating a tag style

Don't worry, you won't have to remember all this strange new syntax. Dreamweaver makes defining styles, applying styles, and setting up style sheets easy.

To make the demonstration a little simpler, open this basic HTML file in your browser and choose File > Save As. In Windows, make sure that the Save as type pop-up menu reads Web Page, complete or HTML Files. On the Macintosh, make sure that the Format pop-up menu reads Source or HTML Source, not Text. Save the file as basic.html in the local root folder of one of the sites you've defined in Dreamweaver (see Site Management in the Dreamweaver Help pages or the Using Dreamweaver manual), and then open basic.html in Dreamweaver.

To define a style for an HTML tag:

1 Choose Window > CSS Styles to open the CSS Style palette.
2 In the CSS Style palette, click the New Style icon.
A New Style dialog box appears.
3 Select the Redefine HTML Tag option, and choose h2 from the text field's pop-up menu. Click OK.
A Style definition for h2 dialog box appears.
4 Make sure Type is selected in the Category list on the left.
5 From the Font pop-up menu, choose Arial, Helvetica, sans-serif.
6 From the Weight pop-up menu, choose 700.
Font weights can be defined using words like bold, bolder, or lighter; they can also be defined on a scale of 100 to 900. The normal weight is 400; 700 is bold; 900 is extra bold.
7 From the Size pop-up menus, choose 16 and points.
Unlike HTML, CSS definitions are not limited to a relative font size scale. You can define a style with any type size you like, using any of several measures—points, mm, pixels, and so on.
Note: Because the screen resolution on many PC monitors is different from that of Macintosh monitors, fonts may appear significantly larger on Windows computers. If you're creating pages in Windows, you may want to use slightly larger-than-normal fonts to improve readability on the Macintosh; if you creating pages on the Macintosh, you may want to use slightly smaller fonts so they won't look huge on Windows. Alternatively, you can specify different style sheets for Macintosh and Windows.
8 Point to the color box and drag to select your favorite shade of green, or enter #006600 in the Color text field.
9 Click Apply.
The results are now visible in the Document window. If you like what you see, click OK. If you prefer a different color or font size, make adjustments and click Apply again.
Repeat this procedure to define styles for TD and A . Make the font for TD Courier New, Courier, mono. Don't define any other attributes. For A , set only the Decoration: Select the none option to prevent links from being underlined.

To Table of Contents Back to Previous document Forward to next document