Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Defining and changing type with the CSS Rule Definition dialog

From: Typography with CSS in Dreamweaver

Video: Defining and changing type with the CSS Rule Definition dialog

The CSS Rule Definition dialog is useful for both creating and modifying CSS rules to style text, CSS rules to style text, especially if you'd prefer not to write out the CSS code yourself. The dialog is organized by categories and virtually every one of them can be used for styling text. I have open here the mission.htm file from Chapter 1 > 01_03 folder, and before we begin our exploration of the CSS Rule Definition dialog box, I just want to point out that there are like many of Dreamweaver's interfaces, several ways to expose it.

Defining and changing type with the CSS Rule Definition dialog

The CSS Rule Definition dialog is useful for both creating and modifying CSS rules to style text, CSS rules to style text, especially if you'd prefer not to write out the CSS code yourself. The dialog is organized by categories and virtually every one of them can be used for styling text. I have open here the mission.htm file from Chapter 1 > 01_03 folder, and before we begin our exploration of the CSS Rule Definition dialog box, I just want to point out that there are like many of Dreamweaver's interfaces, several ways to expose it.

One way to get into it is to go in through the Property Inspector. Another technique is to go in through the CSS STYLES panel, whether you're creating a new rule or editing an existing one. Let's take a look at the Property Inspector route. So I'm going to go down to where my callouts are, and I'll select this text here, the Day Spa Package. Note that this text does have a Targeted Rule and you can see it listed here; it is #sidebar #specials p. So we're going to go ahead and make changes to that, but we're going to make some changes that aren't on the Property Inspector.

So to do that, we'll click Edit Rule. Then the CSS Rule Definition dialog box opens up. Notice that the title has been customized and includes the rule as well as where it's located. So we'll start out in the Type category and you can see what properties are already applied. Here in the Font-style property, the italic value has been applied. So I'm going to go ahead and get rid of that by changing it to normal. And let's say I want to change the color of the text, so I'll open up the Color Picker and I'm going to sample the background color here, just so it ties in with our design.

Now the next category that has a lot of text controls on it is the Block category. Here you can control Word-spacing, Letter-spacing, the Vertical-alignment, the standard horizontal alignment, and then also Text-indent, White-space, and how the element displays, whether as a block or an inline element. Now if I wanted to change the text alignment for example, I would just open up the list here and I could choose from any of the four available options: left, right, center, or justify. Let's go ahead and just keep it right justified; that seems to fit with this design.

Next, let's go to the Box category. This is where you can control the Padding and Margin of an element. Here we can see that the Margin is set to 0.5 ems for the Top and the Bottom. Let's increase that just a little bit, and I'll make those 0.8. Now if I wanted to add a border to my text, I would go to the Border category. If I was working with lists, I have the List category, and so on. Alright, let's go ahead and click on OK. And once I deselect the text, you can see my new color and the fact that it dropped down a little bit.

All my new properties have been applied. Of course, with a name like CSS Rule Definition dialog box, obviously you can not only modify existing rules, but define new ones. Here's how you do it. Let's scroll back up and then select the h3 element, "Our goals and how we'll reach them." Now you'll notice in the Property Inspector that there's not one very specific rule that applies to it. The most targeted rule is the one that applies for all the headings and the paragraph tag. So let's create a new one.

We'll open up the Targeted Rule list and choose New CSS Rule. This time when we click Edit Rule, the New CSS Rule dialog box opens up instead of the CSS Definition dialog box. And we're going to switch to the Compound Selector Type, and then Dreamweaver will automatically populate the Selector Name field with the most highly targeted selector it can. Now we don't need it to be quite this targeted, so I'm going to go ahead and click Less Specific a couple times just so that we're in the main header, in an h group, and targeting the h3 tag.

We'll leave our Rule Definition defined in main.css and click OK. So now in the Type category, I'm going to go ahead and select Font-weight normal. h3 tags normally have a Font-weight of bold and I want this to appear a little lighter. I want to also automatically uppercase it all, so I'm going to Text-transform, and once I open up that list, I see that one of the values is uppercase, so I'll select that, and then again, I'm going to sample the blue background.

Okay, so that's what our h3 tag looks like now; let me go ahead and click OK. And you can see how significantly it's changed. Now I can continue to add properties. If I want to go ahead, and let's say Center this, I can just use my Property Inspector here, or I could've gone back into Edit Rule, reopened the CSS Definition dialog box, and then switched to the Block category to choose the Text-align value I wanted.

However, that's a lot more steps than just clicking it on the Property Inspector. So you can use a CSS Rule Definition dialog box in combination with the Property Inspector. You're not locked into one path or another. Now I want to add one more property. To do that, I'm going to click on Edit Rule because this is a little bit more of a complex property. Let's go to the Border category, and we'll add a single border on the bottom. Now to do that, I'll need to deselect each of the Same for all check boxes, and then in the Style, I'll choose solid.

Under Width, we'll put in 1 pixel, and we'll be consistent and select the blue from the background. Alright, let's hit OK, and now I'll go into Live View, and there you can see the final product. Now to save my changes, I'll go up to File and then choose Save All Related Files. This will save the CSS files as well as the source file if necessary. The CSS Rule Definition dialog is really great for writing out your CSS styles without knowing a lick of code.

Show transcript

This video is part of

Image for Typography with CSS in Dreamweaver
Typography with CSS in Dreamweaver

36 video lessons · 8073 viewers

Joseph Lowery
Author

 
Expand all | Collapse all
  1. 3m 52s
    1. Welcome
      1m 19s
    2. Using the exercise files
      2m 33s
  2. 19m 16s
    1. Working with the Property inspector's HTML tab
      2m 0s
    2. Making the most of the Property inspector's CSS tab
      4m 57s
    3. Defining and changing type with the CSS Rule Definition dialog
      6m 16s
    4. Modifying type directly in the CSS Styles panel
      6m 3s
  3. 19m 45s
    1. Understanding type measurement unit options
      2m 50s
    2. Working with pixels
      2m 34s
    3. Defining a percentage-based page with ems
      6m 51s
    4. Letting users set page type size
      7m 30s
  4. 17m 36s
    1. Getting to know the basic font categories
      1m 32s
    2. Employing web-safe fonts
      3m 20s
    3. Defining new font families
      3m 22s
    4. Exploring CSS3 typeface options
      3m 9s
    5. Setting up @font-face
      6m 13s
  5. 9m 39s
    1. Dispelling the myth of web-safe colors
      1m 13s
    2. Applying color to type
      4m 52s
    3. Incorporating semi-transparent type
      3m 34s
  6. 19m 46s
    1. Setting the font-weight
      3m 48s
    2. Mandating font case
      2m 25s
    3. Exploring font variants
      1m 50s
    4. Utilizing white space effectively
      3m 40s
    5. Changing letter and word spacing
      2m 20s
    6. Defining first-line variations
      2m 19s
    7. Inserting drop caps
      3m 24s
  7. 20m 17s
    1. Applying CSS3 text effects
      5m 26s
    2. Designing type gradients
      8m 27s
    3. Rotating text with CSS transform
      6m 24s
  8. 15m 21s
    1. Implementing advanced headings with HTML5
      3m 11s
    2. Preparing CSS3 multiple-column layout
      4m 50s
    3. Future type: Defining CSS Regions
      7m 20s
  9. 24m 51s
    1. Styling unordered lists
      6m 51s
    2. Specifying a sequence with ordered lists
      5m 14s
    3. Applying definition lists
      7m 19s
    4. Targeting list items with CSS3 nth child
      5m 27s
  10. 20s
    1. Next steps
      20s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Typography with CSS in Dreamweaver.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.