14.3. Applying Typographic StylesWhen you're building a site with Cascading Style Sheets, you aren't playing around. You get a host of typographic styles: everything from boldface to small caps. The procedures for adding them vary, though. Sometimes you use the Property Inspector. Other times you go for the CSS Rule Definition dialog box, as the following sections demonstrate. 14.3.1. Adding Boldface and ItalicsThe B and I buttons on the Property Inspector control boldface and italic type styles, respectively. Normally, this humble tome advises against you clicking the buttons of the Property Inspector whenever it comes to text, because Dreamweaver embeds the corresponding CSS code into your page rather than writing it into your external stylesheet. However, bold and italic type styles are an exception to this rule, because these buttons don't generate CSS code. Rather, when you click them, they insert good old ordinary HTML tags. So feel free to highlight a word or string of text, and click B for bold or I for italic, as Figure 14-5 shows. Figure 14-5. Click the B or I buttons on the Property Inspector to apply boldface or italic type styles to otherwise normal text
That said, it makes good sense to lay off the B and I buttons when you need to apply bold or italic type styles consistently on a particular kind of text, say, for instance, the special paragraph style for the title of your page. In cases like these, simply build the boldface or italics into the style rule when you create it. In the CSS Rule Definition dialog box shown in Figure 14-6, set boldface from the Weight menu and set italics from the Style menu. Figure 14-6. The Weight and Style menus are under the Type category
You'll also discover some interesting choices under both the Weight and the Style menus, like Bolder and Lighter for the weight and Oblique for the style. Currently, no major browser does anything special with these options, so just stick with bold and italic. 14.3.2. Transforming Lowercase Letters to Small CapsIn typographical circles, small caps or small capitals refer to smaller versions of uppercase letters (A, B, C) that stand in for lowercase letters (a, b, c). Using small caps is a great way to get an old-style look in headings and heading-like paragraph styles, as Figure 14-7 shows. Figure 14-7. For old-style headlines, convert lowercase letters to small capsTo add small caps to a CSS style, set the Variant menu on the CSS Rule Definition dialog box to small-caps, as shown in Figure 14-8. The browser automatically converts all lowercase letters in text of this style to small caps.
Figure 14-8. Set small caps from the Variant menu
It's important to note that Dreamweaver's document window displays small caps as regular capital letters. You have to preview your page in a live browser to see the small caps in action. All the major browsers support this style. 14.3.3. Transforming Type CasingSimilarly, you can change the way the browser displays the casing of a block of type with the capitalize, uppercase, and lowercase values, all of which appear under the Case menu of the CSS Rule Definition dialog box, as Figure 14-9 shows. Figure 14-9. Change the casing of a block of type from the Case menuTable 14-1 summarizes the effects of these values when you assign them to a style rule. Note that, in each instance, you aren't changing the actual text of your web page. You're simply changing the way that the browser displays your text. So if you build a lowercase transformation into your default first-level heading style, any uppercase letters in your first-level headings remain uppercase letters in the HTML code. On screen, the browser displays them as if they were lowercase.
14.3.4. Avoiding the Underline StyleMany web designers see that Underline option in the CSS Rule Definition dialog box and go ape. Soon, everything is underlined on their web pages. This humble tome urges you to resist the impulse. In fact, it goes so far as to suggest that you forget you ever saw anything about underlines in the CSS Rule Definition dialog box. Underlines are for links. That's what your visitors expect. If you underline text that isn't a link, your visitors will try to click it anyway, and then they'll get frustrated when your "links" don't work. If you don't want to underline links on your site, that's your concern, but don't compensate by underlining everything else in sight. It's far better to forego this style altogether than to underline something that isn't a link.
If you want emphasis, don't underline! Use italics or boldface instead. |