CSS layout and printing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I tried printing a page on the site I'm designing, and it printed out
wrong.  It printed the navigation bar first, and then the content (as
opposed to the navigation being next to the content).

I used CSS divs to layout the page.  Do printers not read it

Any ideas on how to get it to print correctly?  My employer wants
every page printed so he can go through each and write notes on the
print outs.

Re: CSS layout and printing

Kathleen Coyne wrote:
Quoted text here. Click to load it

a uri would help with diagnosis, but try a little @media print {} in your
style file,

Quoted text here. Click to load it

in the meantime I guess a screen-cap will just have to do.

William Tasso - http://www.WilliamTasso.com

Re: CSS layout and printing

On Thu, 17 Jul 2003 09:27:17 -0700, Kathleen Coyne wrote:

Quoted text here. Click to load it

How have you linked to the style sheet?

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

will only apply to the page while it is displayed on a screen.

To have the style sheet apply to print as well, use:

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

Better still, create seperate print and screen style sheets:

<link rel="stylesheet" type="text/css" href="foobar.css" media="screen">
<link rel="stylesheet" type="text/css" href="foobar-prn.css"

As it might be sensible to restrict the printed style sheet to just black
on white.

Toby A Inkster BSc (Hons) ARCS | mailto:tobyink@goddamn.co.uk | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:tai@jabber.linux.it
            http://www.goddamn.co.uk/tobyink/ | "You've got spam!"

Re: CSS layout and printing

Quoted text here. Click to load it

Good tip.

I got it to print correctly if I printed it landscape as opposed to
portrait - which is fine, as my employer wanted no scrolling for the
entire site (because he never realizes when he has to scroll on a
site, and always misses extra information!)

Re: CSS layout and printing

Quoted text here. Click to load it

WHAT? Nobody can be that malinformed, can they? How does your employer find
the on switch for the computer? Does your employee ever read past page 1 of
the newspaper?

I would rather look at a site that scrolled a bit than one divided up into a
very large number of 800x600 pages, considering I ususally have my browser
at about 900x1100. One would loose track of the information whilst
negotiating with the navigation.


Site Timeline