views:

109

answers:

2

Should i keep #wrapper{ width:100%} in print css? because on screen my design is a fixed width design 960 px. but there are so many paper type and sizes in the world and anybody can take print on any size paper, bigger and smaller.

So if in print css i do not specify relative width then i think print of page will cut of from right size if user will take print on the paper size which can smaller or larger width than my site #wrapper width (960px). then it can create problem.

http://www.dpandi.com/paper/index.html

printer also leave some margin when printing.

So should keep everything is relative size in print css?

update:

And should i also change float left or right to float:none in print css?

+1  A: 

Yes, you should. If you stick to a definite pixel size, you could even run into a situation where different visitors could see different amounts of the page cut off because of their printer DPI and/or browser. You might want to also consider adjusting your font sizes to be relative as well (using em or %).

Word of caution: make sure all your elements flow correctly when you switch over to a relative width, or you could have other parts of your content cut off or pushed into strange places.

derekerdmann
A: 

The browsers tend to translate pixels to a similiar size before sending to printer, so it will look similar to what you see on screen. It will not send the pixel size to the printer.

awe
you mean no matter fixed or fluid unit
metal-gear-solid
It will look similar to what's on screen. If you want to take specific design considerations for print layouts, you need to do this, and the best way is to use no width at all, just use `width:auto;`. That way, it is the content that defines how it is laid out on the paper. This of course, depends on how you want the printout layout to be like. You should take in consideration that often background images/colors are often not shown. This is a user setting in the browser.
awe
Also see http://www.w3.org/TR/CSS2/page.html for the css definitions that apply specifically to paged media (like paper). This works well in Internet Explorer and Opera, but not so well in Firefox. My experience is that when it comes to printing web pages, IE7+ is very good.
awe