Past Weeks New Content
Search CMX

Advanced Search

Latest Free Content
View All
Free Content
Accessibility

Dreamweaver CS4 Public Beta: What's New? - Part 1

By: Sheri German

Page 2 of 3

Set for printing

Previous Next

The CSS Tab

The CSS portion of the Properties inspector is a dream come true. Here is a list of just some of the new functionality it provides:

Let's walk through an example task in the music layout pictured at the beginning of this article.

  1. Place the cursor in the heading "Music through the ages".
  2. Click the CSS button in the Properties Window. Dreamweaver intelligently looks at your selection and lists an existing rule that might apply to it. Adobe refers to this as a "best fit selector". In this case, the descendant selector #content h1 appears to be the best fit for the selected text.
  3. Click the center align button. Dreamweaver center aligns the H1 text without adding deprecated code! Look at the properties for the rule to see how the centering is added.
  4. Use the Color Swatch to select a new color for the text. Of course, you can also click the Edit Rule button to open the rule in the CSS Styles Panel.

    Edit the h1 rule
    Image 3: Dreamweaver intelligently detects that the cursor is within the #content h1 rule

  5. Click the center align button again, and the text moves to the left. Dreamweaver removes the property and value pair from the #content h1 rule.
  6. Now select some text on the page within the content region.
  7. Make sure that the CSS button in the Properties Inspector to still in the forefront. Again, Dreamweaver intelligently looks at your selection and lists an existing rule that might apply to it. If it finds none, it displays <New CSS Rule> in the Targeted Rule drop down menu. (Tip: The Targeted Rule drop down menu also lists an option to add New Inline Style and New CSS Rule.)

    Select element
    Image 4: Make a selection in the document to add HTML or CSS formatting from the Properties Window

  8. Click the Edit Rule button.
  9. The New CSS Rule dialog box displays. Hey! Look at this new dialog box! Again, Dreamweaver intelligently senses what you want to create. Here's the cool part - remember how Dreamweaver, based on where your cursor was positioned on the page, displayed complex selectors whether you needed them or not? For example, for the new rule we want to create for paragraphs within the content div of the music page, Dreamweaver includes the parent div container in the selector name. Because in this case we don't really need all of that, we can click the Less Specific Button to get rid of it.

    Create new rule
    Image 5: Click the Less Specific button to delete the #container ID name from the rule

    More specific button
    Image 6: Now that the #container div is gone, a More Specific button becomes activated

Page 2 of 3 Previous 1 2 3 Next


download
Download Support Files


Keywords
Dreamweaver CS4 public beta, CSS features,