Today you're going to play with print style sheets. One of the problems of printing web pages is that when you ask a page to print it will print everything including menus, ads, and headers. To solve that problem, you need to create a separate print stylesheet in addition to your regular style sheet. So in addition to you regular style sheet command which appears in the head of your document<link rel="stylesheet" type="text/css" href="style.css" /> you need to add a second one like this <link rel="stylesheet" type="text/css" href="print.css" media="print" />. You don't need to completely re-write your style sheet. The only things that need to appear in the print stylesheet are the things you want to change when printing. For example, if you chose to give your paragraphs a particularly vibrant text color like pink that won't print well p{color:pink;}, in the print css you can redefine this to p{color:black;}. As well, if there are elements you don't want print, such as a particular div, or paragraph, you can define them to not display. If your paragraph p.bob contained information that you didn't want to print, all you'd have to do is put p.bob{display:none;} into your print css. Pretty easy, eh? So-oo-oo, what you need to do is this:
|
Web Design 35S > CSS >