SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Resource

Using CSS to specify alternate document to print out

Categories...
Client User Group
HTML, CSS and XML
Language
No Script
Product
IE4, IE5
Task
Printing
Technology
CSS, HTML

Sponsored Links
Developer's Paradise : Inside Technique :
Using CSS to specify alternate document to print out
Submission by SiteExperts Staff

Go to the resource:
Using CSS to specify alternate document to print out

Add to Assistant

Short Description
Specify a special print-version of your document using CSS and the HTML Link Element.

Long Description
With Internet Explorer 4.0 and later you can define a print-version of your document (and it can even be a Word file!). See how in this article from our friends at Dynamic Drive.

Author
John Miller
Date/ Version
7/25/2000
Submission URL
http://www.SiteExperts.com/tips/styles/ts41/page1.asp
Submission Date
Jul 25,2000
Last Update
Jul 25,2000
 

Discussion and Rate this Resource
Overall Rating: 4

Schmoopy on Feb 19, 2005 at 8:29:01 AMRating: 5

I have developed a site where I use ASP to read the browser's screen width and available height, then display the content within that area. The problem is that when a user prints the page, the content is cut off on the right. Normally I would use the print media stylesheet, but since the ASP script provides the top, left, width, and height of the division/layer, the print stylesheet is ignored. Has anyone played with using ASP to create style sheets dynamically? Would doing this tax the server?

fidster on Dec 4, 2002 at 10:00:31 PMRating: 3

I'm trying to create a printable pdf version of the content by inserting the following into my head tag:

<link rel="alternate" media="print" href="/helmsman/acrobat/helmsman_content.pdf">

However all that prints is pages and pages of code/unformatted info from the content of the pdf.  Can anyone suggest why this would be happening?

thanks in advance!!

Witold on Jan 21, 2001 at 5:24:47 PMRating: 2
rather obvious
webguy on Aug 23, 2000 at 9:42:17 AMNo Rating

Here is a sample syntax for print-specific style sheets:

<style type="text/css" media="print">
.non-print
{
  display: none;
}
</style>

<link rel="stylesheet" media="print" href="print-style.css">

You can even do it within the same style sheet although I am not sure which browsers support ths except IE5+:

@media print
{
   .non-print
   {
     display: none;
   }
}

RomaLu on Aug 17, 2000 at 11:55:01 AMRating: 3
I don't have time to make alternate documents for printing for every document we have (over 11,000 so far that we track by a numbering system!)

More Ratings/ Comments


To rate and comment on a resource, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password

Copyright © 1997-2008 InsideDHTML.com, LLC. All rights reserved.