'Printable View' Specs

Discussion in 'HTML & Website Design' started by travoholic, Oct 24, 2007.

  1. #1
    Hey all,

    I'm wondering if there's a standard way to build pages that can be printed. I want to build my site as normal but for some pages I want to have a 'Print this page' option that takes the reader to another page that will print just the text.

    It's a pretty basic question but I guess I'm just wondering how you go about doing this. Is there a standard width I should use? What about page breaks... should I just let everything flow together and let the printer sort it out or should I put the text into a table with a defined width and height?

    Thanks,
    Kirsty
     
    travoholic, Oct 24, 2007 IP
  2. webdesigner

    webdesigner Well-Known Member

    Messages:
    489
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #2
    You can actually have a seperate stylesheet for print which would allow a user to print that page (you could just have a print button) and it would only print what you have declared to in print stylesheet. Just use:

    
    <LINK rel="stylesheet" type"text/css" href="print.css" media="print">
    
    Code (markup):
    Any containers you don't want to show, just set them to display:none; (like maybe header/footer/search/links) etc in print stylesheet. Can also set width to 100% to match printer paper size.
     
    webdesigner, Oct 24, 2007 IP