Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Dreamweaver

  • Print
  • + Share This
From the book Removing unneeded styles

Removing unneeded styles

Even with the changes in the previous exercises, many rules in the two style sheets are exactly the same. To reduce file size, it’s a good idea to remove rules from the print-media sheet that haven’t changed or ones that don’t pertain anymore. You can delete unneeded styles using the CSS Styles panel. But be careful—even though a rule hasn’t changed doesn’t mean it’s not needed for print rendering.

  1. Select all rules that format the ul.nav menu in print_styles.css. Click the Delete CSS Rule icon or right-click on the selected rules and choose Delete from the Context menu.
  2. Since the vertical menu isn’t displayed, there’s no need for those rules. In fact, you can remove all rules that format hyperlink behavior, too.

  3. Select all hyperlink rules in print_styles.css and delete them.
  4. The hyperlinks in the horizontal and vertical menus are not printing at all, and the other rules are still identical to the ones in the screen styles and will be inherited, if supported by the print application. After deleting any rules always test the page in the browser and in the print application.

  5. Save all files.
  6. Click the Render Screen Media Type button. Observe the screen display in Design view.
  7. Dreamweaver renders the document for the web.

  8. Click the Render For Print Media Type button.

Dreamweaver renders the screen using the print style sheet. You have adapted a screen-media style sheet to make a web page render more usefully in print.

You have completed the basic design of the page that will be used as the project template and adapted it to print media. In the next lesson, you will learn how to convert this layout into a dynamic web template.

  • + Share This
  • 🔖 Save To Your Account