hi Neil,
thanx for your reply.. as mentioned earlier, the following method don't seem
to work for me.. my still moves up the page if my has only a
few lines of content. =(
hwee
- Original Message -
From: "Neil Smith [MVP, Digital media]" <[EMAIL PROTECTED]>
To:
Sent: Friday, April 01, 2005 4:52 PM
Subject: [PHP-DB] Subject: Web Printing
> At 10:27 31/03/2005 +, you wrote:
> >Message-ID: <[EMAIL PROTECTED]>
> >From: "Ng Hwee Hwee" <[EMAIL PROTECTED]>
> >To: "PHP DB List"
> >Date: Thu, 31 Mar 2005 18:24:41 +0800
> >MIME-Version: 1.0
> >Content-Type: multipart/alternative;
> > boundary="=_NextPart_000_00CD_01C5361E.E80297D0"
> >Subject: Web Printing
> >
> >Hi all,
> >
> >i know i can print out a header and footer using HTML and
.
> >However, the doesn't always stay at the bottom of the page. For
> >example, if the the last page only have 2 records, the will
appear
> >pretty high on the page.
> >
> >i am wondering how can i use PHP to fix the position of my header and
footer
>
> PHP cannot help you here, it's the wrong tool for the job (it's a "hammer"
> not a "screwdriver" so to speak).
> You need to (*must* !!!) use CSS to position and specify the height and
> dimensions of the thead and tfoot thus :
>
>
> thead {
> display: table-header-group;
> position: absolute;
> top: 0;
> height: 36pt;
> width: 100%;
> }
>
> tfoot {
> display: table-footer-group;
> position: absolute;
> bottom: 0;
> height: 36pt;
> width: 100%;
> }
>
> These should apply *reasonably* well to position your thead and tfoot row
> groups in the same place on each printed page (adjust as desired). You
> *cannot* use PHP to "guess" the height of the page areas reliably unless
> you are using a fixed pitch font such as a dot matrix line printer. And
> even then it's somewhat guesswork (I've done both).
>
> But if we're assuming that you're users have laser printers you *must* use
> CSS to do the print layout, PHP "line height guessing" will not work for
you.
>
> Cheers - Neil
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php