On Wed, Dec 22, 2010 at 9:31 AM, Mark Richards <m...@date.net> wrote:

> On Mon, Dec 20, 2010 at 18:40, Evan Panagiotopoulos <epana...@gmail.com
> >wrote:
>
> > I create a string of html documents using php. Each document prints one
> > sheet of paper.
> >
> [snip]
>
> > If I use: <div id="print-footer"> Using id=... to call the css and I only
> > get the footer properly placed on the first page only. The rest of the
> > pages
> > do not have a footer.
> >
> > If I use <div class="print-footer"> Using class=... to call the css I get
> > the "footer" text placed under the end of the content on each page.
> Somehow
> > it does not appear as a footer.
> >
>
>
>
I think your solution is in the PHP and not the CSS.  You need the PHP to
only add the footer div to odd pages.  PHP can count (what you define as)
pages, but CSS cannot.  You could add a class to odd pages in which case CSS
could be used to show or hide based on the presence of that class, but
honestly, once you've done the logic to add the class, you might as well
just be adding the entire div in question instead.  Regardless, what you
determine to be a single page will definitely not be a single page on every
printer.  You'll likely get reports of people getting that footer in very
odd places.

As soon as you start thinking printing, you should probably move to PDF.
Unless you have the requisite amount of self loathing to tackle
"PHP+HTML+CSS+The Universe of Printers." I'd recommend that route.

-Tim

-- 
-----------------------------------------
tim.arn...@gmail.com
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to