PDA

View Full Version : Page size


Dingo
02-02-2003, 02:20
Sometimes when I print a webpage ( like KustomPCs home) it is too wide for one sheet of A4. Yet Coolercases home fits nicely on to A4. A page I am trying to make up has the same width problem as kustomPCs. It's not the content but the page size. How do I fix it?

[GPO]Solitaire
02-02-2003, 02:28
there is a fine line between setting a page layout for either a screen or an a4 printout,
microsoft's site is terrible for it, (i've never printed a page from kustom's site) i never rely on the layout of a web page so i usually ''cut'n'paste'' into word then print.

it's an added hasle but i atleast don't miss that vital peace of information that is usualy on the missing bits of the printout!!!

i'd love to find out how to get those pages to fit on a4 too....

Zozart
02-02-2003, 12:16
it usually depends on the overall width of the page. Like, a width of 600pix will easily fit onto an a4 page. Centering the layout might also help?

AlastairM
02-02-2003, 12:43
There's no easy answer, the average screen page width of about 750 pixels is as you've found too wide when printed on A4.

I'd bet the reason the coolcases page prints is that its a 'liquid' design, in that the page width expands and contracts to fit the browser window, much like this forum does.

There is another option that may work, kind of difficult to explain without seeing your page but you could add a print stylesheet to over-ride your layouts screen width and reduce it down closer to the 600px mark. Only works on IE6 (maybe IE5, not sure) and gecko based browsers.

Post a link up, If I get a minute today I'll try it and see if it works.

cheers

alastair

Dingo
02-02-2003, 16:01
Here is the page that I can't print centrally. Link to Page here. (http://www.ghprecisiongrinding.co.uk/mach.htm)
Im sure when I first started the page setup I had to set a width, but I don't get prompted for that now.
As a matter of interest to the motoring fraternity the company here grind all the wheeel bearing hubs, struts etc for those yellow F1 cars, and a lot of motor parts for black/white ones as well as other sporty fords.

AlastairM
02-02-2003, 16:45
well you've got two options with that particular page.

1) change the outmost table width from 780 to 100%, this'll cause the page to stretch to fill the browser window as well as fitting onto an A4 page.

OR

2) add the following code to the table.

start with:
<table width="780" height="520" border="0" cellpadding="5" cellspacing="0">

and change it to:
<table class="print" width="780" height="520" border="0" cellpadding="5" cellspacing="0">

then add the following to your document head:

<link rel="stylesheet" href="print.css" type="text/css" media="print">

and adjust the paths to suit.

in your print.css file add the following


.print{
width:100%;
}


and that'll let you have a fixed with on-screen and a flexible width in print, assuming of course their using a recent browser.

cheers

alastair

Dingo
03-02-2003, 19:54
Right I will try that thanks.