Welcome to WebmasterWorld Guest from 54.145.13.215

Forum Moderators: not2easy

Message Too Old, No Replies

Print CSS files - point sizes necessary?

Or will pixels do?

     
10:14 am on Feb 13, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 5, 2002
posts:1318
votes: 0


I've read somewhere that you should use point sizes for fonts when delivering a print-only CSS file. It's because printers use points and screens use pixels, right? And yet a stylesheet using pixels prints out perfectly. So is there any reason to change it to use points?

What would happen to carefully positioned divs?

Oh, and no comments that you shouldn't use pixels or absolute positioning please.

10:17 am on Feb 13, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Nov 28, 2002
posts:317
votes: 0

10:18 am on Feb 13, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 25, 2002
posts:3185
votes: 0


Hi Hester,

When I create a print media CSS file I leave my font units at pixels, and like you said, I have found that it prints ok (I test on both Mac and PC).

On your point about absolutely positioned div's - many people alter their print css file to match the size of an A4 page and adjust their margins accordingly. I suppose that it's a matter of printing your current version and see if there are any problems with your current layout.

11:45 am on Feb 13, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 5, 2002
posts:1318
votes: 0


Oops, looks like I'm in the wrong forum. Sorry! Can the moderator move this to the CSS forum? Ta.

On your point about absolutely positioned div's - many people alter their print css file to match the size of an A4 page and adjust their margins accordingly. I suppose that it's a matter of printing your current version and see if there are any problems with your current layout.

That's exactly what I've done - using Print Preview. In my print CSS file I've removed elements that don't have a purpose when printed out, such as large blank areas of colour, menu links, etc, by using {display:none;}. Then I moved the rest of the contents left to fit the A4 page. (What if someone uses a different paper size though? Such as Legal, or A4 Landscape?)

12:50 pm on Feb 13, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 25, 2002
posts:3185
votes: 0



What if someone uses a different paper size though? Such as Legal, or A4 Landscape?

It would be very difficult (nigh on impossible) to try and cater for some people's unusual setup. I'm not sure about the States, but certainly in Europe the vast majority of desktop printers default to A4 portrait.

6:17 pm on Feb 13, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 6, 2002
posts:63
votes: 0


if you defined your main content div as 100% on your print style sheet would the content not expand/collapse to fit on any printer setup?
This is just a shot in the dark btw, I've not really familiar with using printer stylesheets.