printing a web page

They have: 46 posts

Joined: May 2002

Hi,

I'm sure we all have different opinions about the width of web page - i.e. make it dynamically expand to fit any size monitor or design it to be a fixed width.

Right or wrong, I take the latter approach - most of my web site designs are 770 pixels wide, so that they can fit exactly as I intend them on a monitor with 800x600 resolution, without a horizontal scroll bar. (You have to leave off 30 pixels to leave room for the vertical scroll bar)

But some of my clients like to print out these web pages and they complain that they are too wide to print out in portrait mode. They could print them out in landscape mode, but they don't want to.

Without going into the details, it's also not practical to have a printer-friendly version like some web pages do.

So here's the question: Is there a way (preferably in Internet Explorer) to print a web page in portrait mode - and shrink it to fit the width of the paper when printing?

Any other ideas? Suggestions?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Use fluid tables instead of fixed with (or use CSS positioning), then set a print stylesheet.

alistapart.com has more information on this.

It works with tables if you set the fixed width in the CSS, as well, so you can change the width to relative in the print style sheet.

They have: 46 posts

Joined: May 2002

Wow - thank you - I found an article there that directly addresses this question, at: http://www.alistapart.com/stories/goingtoprint/

But now it seems as if I'll need to change the way I create my tables. I've always used the old fashioned method of:

But now it seems that I'll need to declare the table width in a style sheet so that a separate "print" style sheet can change the width when printing. Do you agree that I'll have to do that?

TIA

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Sounds like it, yes. Smiling

They have: 8 posts

Joined: Dec 2002

Yep, agreed. Check out http://www.plusp.com for example - by using a print stylesheet when you print you get black text, none of the site design, and an extra bit of info at the end about where the stuff came from. I find print stylesheets to be much nicer than a separate "print page" link.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.