Start learning with our library of video tutorials taught by experts. Get started

Dreamweaver CS3 Essential Training

Styling for print


From:

Dreamweaver CS3 Essential Training

with Garrick Chow

Video: Styling for print

Now that we've attached a print media style sheet to our page, it's time to actually start creating the rules. And again, my goal here is to create a set of rules that are specifically aimed for when somebody goes to print this page, and it will render this page in a way that makes it look good when it's actually printed on paper. We saw in the previous movie, when we go to preview the print of this page, the Teacloud logo looks pretty bad without that background color, we have unnecessary navigation over here and over here. What I'd like to do first is to hide this navigation area. If I click in here, I can see that this has the ID of . Now, there's some rules set up in our main style sheet for td Navigation right here, and they basically just have to do with the background color, the padding, and the color. What I'm going to do is set up a rule that appears only in the print.css document that will hide this navigation bar if somebody goes to print this page.
Expand all | Collapse all
  1. 1m 12s
    1. Welcome
      1m 12s
  2. 21m 0s
    1. HTML vs. XHTML
      3m 4s
    2. What is CSS?
      3m 48s
    3. What is XML?
      2m 11s
    4. What is DHTML?
      1m 9s
    5. What is JavaScript?
      1m 23s
    6. File naming conventions
      3m 22s
    7. What is an index page?
      6m 3s
  3. 46m 18s
    1. Setting up your workspace
      2m 39s
    2. The Welcome screen
      4m 11s
    3. Windows and Mac differences
      3m 18s
    4. The Insert bar
      4m 38s
    5. The Property Inspector
      1m 50s
    6. The Document toolbar
      6m 6s
    7. The Document window
      9m 11s
    8. Panels and panel groups
      6m 58s
    9. Saving workspace layouts
      2m 22s
    10. Defining a default browser
      5m 5s
  4. 24m 59s
    1. Defining a site
      9m 5s
    2. File and folder management
      3m 11s
    3. Understanding path structure
      3m 17s
    4. Adding content to a site
      6m 6s
    5. Creating a site map
      3m 20s
  5. 38m 39s
    1. Creating a new blank site
      6m 0s
    2. Creating and saving a new document
      7m 54s
    3. About DOCTYPE
      3m 59s
    4. Inserting images
      9m 26s
    5. Inserting text
      3m 35s
    6. Aligning text and images
      4m 9s
    7. Inserting meta tags
      3m 36s
  6. 45m 58s
    1. Link basics
      6m 4s
    2. Linking with Point to File
      5m 18s
    3. External links
      4m 15s
    4. Creating email links
      5m 49s
    5. Named anchors
      7m 37s
    6. Linking to a file
      7m 35s
    7. Image maps
      9m 20s
  7. 1h 8m
    1. About CSS
      4m 52s
    2. Anatomy of a style sheet
      4m 10s
    3. CSS and page properties
      10m 11s
    4. Moving an internal style sheet to an external style sheet
      6m 46s
    5. The CSS Styles panel
      3m 48s
    6. CSS selectors
      2m 37s
    7. Type selectors
      12m 13s
    8. ID selectors
      10m 21s
    9. Class selectors
      5m 42s
    10. Creating rollovers with pseudo-class selectors
      7m 22s
  8. 42m 54s
    1. CSS vs. the Font tag
      2m 42s
    2. Formatting text with the Property Inspector
      8m 41s
    3. What measurement should I use?
      3m 15s
    4. Managing white space with margins, padding, and line height
      8m 34s
    5. Using font lists
      5m 45s
    6. Aligning text
      2m 47s
    7. Creating lists
      5m 8s
    8. Creating Flash text
      6m 2s
  9. 43m 19s
    1. About tables
      1m 28s
    2. Tables in Code view
      2m 36s
    3. Creating and adding content to tables
      7m 40s
    4. Changing table borders with XHTML
      5m 46s
    5. Coloring tables with XHTML and CSS
      6m 41s
    6. Aligning table content
      6m 39s
    7. Sorting tables
      3m 6s
    8. Setting table widths
      4m 48s
    9. Creating rounded-corner tables
      4m 35s
  10. 28m 22s
    1. Dreamweaver's layout tools
      3m 8s
    2. Tracing images
      4m 58s
    3. Adding AP div tags
      7m 29s
    4. Working with Layout Tables
      6m 55s
    5. Adjusting table widths and nesting tables
      5m 52s
  11. 16m 19s
    1. What is a device?
      3m 14s
    2. Attaching a printer-friendly style sheet
      3m 5s
    3. Styling for print
      7m 41s
    4. Adobe Device Central
      2m 19s
  12. 29m 54s
    1. Rollover rules
      3m 31s
    2. Creating simple rollovers
      5m 36s
    3. Creating disjointed rollovers
      7m 12s
    4. Creating navigation bars with multiple states
      9m 21s
    5. Creating Flash buttons
      4m 14s
  13. 26m 32s
    1. Viewing the code
      6m 9s
    2. Editing in Code view
      3m 0s
    3. The Code toolbar
      5m 11s
    4. Working with Code Collapse
      4m 27s
    5. The Quick Tag Editor
      2m 20s
    6. Working with snippets
      5m 25s
  14. 32m 45s
    1. About forms
      3m 23s
    2. Adding text fields
      9m 52s
    3. Adding checkboxes and radio buttons
      5m 37s
    4. Adding lists and menus
      6m 5s
    5. Submitting form results
      3m 23s
    6. Styling form elements with CSS
      4m 25s
  15. 23m 17s
    1. Opening a new browser window
      9m 38s
    2. Creating a popup message
      2m 50s
    3. Validating text fields
      2m 42s
    4. Getting more behaviors
      7m 2s
    5. Removing extensions
      1m 5s
  16. 14m 58s
    1. External image editor preferences
      3m 18s
    2. Built-in image editing tools
      3m 11s
    3. Roundtrip editing from Dreamweaver to Fireworks or Photoshop
      4m 39s
    4. Copying and pasting
      3m 50s
  17. 34m 16s
    1. Templates in action
      5m 12s
    2. Creating a new template
      6m 36s
    3. Applying templates
      3m 36s
    4. Modifying a template
      1m 40s
    5. Adding repeating regions
      3m 28s
    6. Working with repeating regions
      3m 13s
    7. Adding optional regions
      3m 34s
    8. Creating a library item
      3m 48s
    9. Modifying a library item
      3m 9s
  18. 13m 2s
    1. Using the History panel
      4m 24s
    2. Saving History steps as commands
      3m 25s
    3. Using Find and Replace
      5m 13s
  19. 14m 44s
    1. W3C accessibility guidelines
      4m 6s
    2. Accessibility preferences
      1m 29s
    3. Inserting accessible images
      3m 2s
    4. Inserting accessible tables
      2m 53s
    5. Inserting accessible form objects
      3m 14s
  20. 26m 17s
    1. About media objects
      2m 6s
    2. Linking to audio and video files
      5m 56s
    3. Embedding audio and video files
      7m 7s
    4. Setting parameters
      4m 27s
    5. Inserting Flash content
      2m 37s
    6. Inserting Flash video
      4m 4s
  21. 28m 47s
    1. Getting site reports
      3m 35s
    2. Checking links sitewide
      3m 30s
    3. Signing up with Tripod
      6m 36s
    4. Entering remote info
      4m 13s
    5. Publishing your site
      5m 41s
    6. Updating and publishing pages
      5m 12s
  22. 44s
    1. Goodbye
      44s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Dreamweaver CS3 Essential Training
10h 22m Beginner Apr 16, 2007

Viewers: in countries Watching now:

In Dreamweaver CS3 Essential Training, instructor Garrick Chow delves into the many powerful features of the latest version of this powerful web design application. He covers everything from the simplest basics of using Dreamweaver CS3 to applying it to develop a fully interactive, accessible site. Garrick explains the new interface features, and demonstrates how to create, edit, manage, design, and publish a professional website with Dreamweaver CS3 and complementary applications. Exercise files accompany the training.

Subject:
Web
Software:
Dreamweaver
Author:
Garrick Chow

Styling for print

Now that we've attached a print media style sheet to our page, it's time to actually start creating the rules. And again, my goal here is to create a set of rules that are specifically aimed for when somebody goes to print this page, and it will render this page in a way that makes it look good when it's actually printed on paper. We saw in the previous movie, when we go to preview the print of this page, the Teacloud logo looks pretty bad without that background color, we have unnecessary navigation over here and over here. What I'd like to do first is to hide this navigation area. If I click in here, I can see that this has the ID of . Now, there's some rules set up in our main style sheet for td Navigation right here, and they basically just have to do with the background color, the padding, and the color. What I'm going to do is set up a rule that appears only in the print.css document that will hide this navigation bar if somebody goes to print this page.

I'm going to come in here and choose to create a new CSS rule, and we're going to make sure that we are applying this rule to td Navigation, and that we're defining this rule in the print.css file, not the styles.css. So, make sure we're doing this to the print style sheet. I'll click on OK. I'm going to go over to the Block category, and here we can find a Display field, and from the Display field we have all these different options, but the option I want in this case is None. Setting the Display property to none will essentially turn off the navigation so it doesn't display when the users print this page. I'll click on OK.

We don't see any change here. We do see that we've added this rule to our style sheet. I'm going to make sure I save that. Because this rule only applies to when I go to print, we need to go to print this to see what this looks like. Let's go to preview this again. Now when I choose Print, and Preview the print, sure enough, notice that navigation area is now gone. It's been hidden. But this still isn't quite what I'm looking to do. The navigation is now hidden, but the logo still needs some work. I also don't need all this sidebar navigation here either. Let's go back to {italic}Dreamweaver. {plain}And we can see, if I click in this field, I can see that this cell has been ID'd with . The cell has been ID'd with . And, we also have this footer information down here, , which we probably don't need where it says "Send us your thoughts," because you can't click that link when it's printed out on paper. So, I want to hide all of these cells. I could come in here and create a new rule and add #tdFooter, #tdNavigation, #tdSidebar, and #tdLogo, all to the same rule here, but then I'd have to delete the one I already created. So, it's much easier to actually come into the style sheet itself. Here where it says #tdNavigation, I'm just going to add those IDs to this rule.

We just simply need to separate them with a comma and a space. So we have #tdNavigation already. Now we'll type "#td logo, space #tdSidebar," of course we want to make sure we're spelling these all correctly, and "#tdFooter." So, changing this rule to include these additional table cells ensures that they're also hidden when users attempt to print this page. Go ahead and save that, and we can check that out by coming in here, preview in {italic}Safari,{plain} and again I'll go to Print this, Preview that. So now I've noticed that my navigation, my logo, and my sidebar are now all hidden, and all we see is the important content of the page.

The last thing I like to do is, I'd still like to have the Teacloud logo on here someplace. We're going to create one more style that actually reveals a hidden image when somebody goes to print this page. Let's go back to {italic}Dreamweaver.{plain} Now as you can see, this whole process of editing a style sheet, saving the document, opening it in a browser, previewing it, doing a print preview, realizing that the browser didn't load the correct version, reloading the browser, and then previewing the print again, can be kind of a tedious process. {italic}Dreamweaver{plain} has a feature called the Style Rendering tool bar that makes this a far less painful process. It's not perfect, but it's a good way of being able to preview how your page might look in different media types without having to go to your browser.

If you're especially eagle-eyed, you might've noticed that at the beginning of this movie I already had this turned on. Notice these buttons up here. You get this by going to the View menu, to Toolbars, and you can choose Style Rendering. That just turned it off. I can turn it back on again. I have this Style Rendering toolbar with these different media types. By default, you're set to render this to a Screen Media Type. We have the Print Media Type, if I click on that. Now, there is a bit of a bug in the rendering type that has yet to be fixed. This should be displaying my page for me in such a way that I would see what this looks like with Print style sheet, and it should have hidden the navigation bar, the logo, and the sidebar. But as you can see, it didn't do that.

You still would need to go out to your browser to preview certain aspects of your style sheets. You can see we also have our Handheld Media Type here. This will only show you anything if you've created a style for these different types. There's also a convenient button here that actually toggles all CSS styles on and off. If I wanted to see what this page looked like with style sheets turned completely off, I could do that. You can see, it's not that great to look at. I'll definitely turn that back on. But we will be able to use this rendering toolbar in just a moment, so let me go ahead and go back to the Screen Rendering. Let's look in the code for a moment.

There's actually a hidden image I want to show you. Notice this div tag right here. Notice this ID is divPrintLogo, that's the name of the div. The image is in the assets folder, images, and it's called printlogo.gif. If I go over and look in my Assets, there's a file in here called printlogo.gif. It's actually a big banner with the Teacloud logo in the middle, that I want to appear at the top of the page when somebody tries to print this file. But this is actually hidden. We don't see this on our screen, there's nothing in here that tells me it's hidden. The reason it's hidden is because actually hidden by the main style sheet, styles.css. If I look in here, there's a rule in here for the #dvPrintLogo, and notice its display is set to none.

But what I want to do now is set up a rule inside the print style sheet that will display this image. Let's come over here and create a new CSS rule, and we're going to make sure this is set to the #divPrintLogo, but instead of this going into the main style sheet, I want to make sure this is going into the print style sheet. Click on OK, and go to the Block category, and I want to set the Text align to center, because I want this in the center of my page. And I want the Display property set to Block. And, as we saw in the chapter on CSS, using the Block property ensures that the image will appear on a line by itself.

It'll reserve that entire line of the document for itself so none of the other text or images will appear on that same line. In this way, because resetting a style specifically for this #divPrintLogo ID, we're going to be overriding the #divPrintLogo rule in the main style sheet when somebody goes to print this document. Let's click on OK. Now that we've set up that rule, I'm going to make sure I save this. Now if I click the Render Print Media Type, there's the image that suddenly appears when somebody goes to print this. Now of course, since {italic}Dreamweaver{plain} has trouble hiding the other areas, this looks kind of silly, but we can go to check this out in our browser.

Let's preview this. I'm going to go ahead and hit Refresh now, and let's go to choose File > Print > Preview, and there it is. Pretty cool. We've hidden in all the unnecessary navigation and buttons, and we've set up this goes to print this. This page will only show up like this when somebody goes to print, and I think this is such a cool thing you can do. It's definitely a little bit time consuming, but if you think that people are going to be printing out your pages for information, why not take some time to make it look good, especially if they're going to be distributing the document, or sharing the document with other people? So, instead of having this page that prints out with unnecessary buttons and links on it, just with a couple of simple rules that you can set up in {italic}Dreamweaver,{plain} we now have a nice looking document that gets all the information across without any extraneous materials. That's how we design styles for devices in {italic}Dreamweaver.{plain} Now that you've learned how to design for a printer in this exercise, you can apply these same skills when learning to design for any device, including PDAs, mobile phones, and so on.

There are currently no FAQs about Dreamweaver CS3 Essential Training.

Share a link to this course
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.
Upgrade now


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.

Upgrade now

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 Dreamweaver CS3 Essential Training.

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 preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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.