CSS layout and printing

K

Kathleen Coyne

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
correctly?

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.
 
W

William Tasso

Kathleen said:
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
correctly?

a uri would help with diagnosis, but try a little @media print {} in your
style file,
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.

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

Toby A Inkster

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

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"
media="print">

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

Kathleen Coyne

Toby A Inkster said:
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"
media="print">

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

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!)
 
R

rf

Kathleen Coyne said:
Toby A Inkster <[email protected]> wrote in message

Good tip.
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!)

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.


Cheers
Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top