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.
- 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.
- Select all hyperlink rules in print_styles.css and delete them.
- Save all files.
- Click the Render Screen Media Type button. Observe the screen display in Design view.
- Click the Render For Print Media Type button.
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.
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.
Dreamweaver renders the document for the web.
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.