Welcome to WebmasterWorld Guest from 54.162.227.136

Forum Moderators: not2easy

Message Too Old, No Replies

Print Page number on each page like 1 of 4 print

Print Page number footer row on each page

     
11:07 am on Sep 13, 2011 (gmt 0)



0 down vote favorite
share [fb] share [tw]


I am using following style to print header and footer for each page.

It's working properly, now I need to put page number in <tfoot> footer row like page 1 of 4.

Please help, how can I set page number?

<style type="text/css">
@media print {
thead { display: table-header-group; }
tfoot { display: table-footer-group; }
}
@media screen {
thead { display: block; }
tfoot { display: block; }
}
</style>

I tried this but it's not working:

@page :left {
@bottom-left {
content: counter(page);
}
}
12:03 pm on Sep 13, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Doesn't the browser do this for you?
7:29 am on Sep 14, 2011 (gmt 0)



I want to change header and footer value of
Internet Explorer >> File >> Page Setup >> Header/footer via css


I want to stop the header from being displayed when you print something and footer will show page number out in Internet Explorer you can simply go into the Page Setup and remove the "&w&bPage &p of &P" for the header and "&u&b&d" for the footer, which show the page numbers and URL.

However, I am developing a web application for a number of users and they will not want to have this URL and the page number displayed. Instead of going around to each PC and change the page setup settings in their internet explorer - is it possible to modify the header and footer values with JavaScript code in the web page that the user will want to print. And if so how is this achieved. If there is a previous discussion on this please point me to the thread.

Thanks.
8:24 am on Sep 14, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



This isn't something you can normally do in script without perhaps some kind of browser extension (or ActiveX control). If you are targeting IE only then may be you can find some browser specific code that might help...?

print without header and footer [webmasterworld.com]
9:03 am on Sep 14, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



However, I am developing a web application for a number of users and they will not want to have this URL and the page number displayed.

How do you know? Do you mean that you've got a pre-determined pool of people so you actually know what they want?

Printing is only partly a browser (or any application) function. Aspects of it are controlled by the operating system, and you'll find it very hard to override those.

Since this is the CSS forum, were you looking for some kind of @media rule?

[w3.org...]
and
[w3.org...]
 

Featured Threads

Hot Threads This Week

Hot Threads This Month