homepage Welcome to WebmasterWorld Guest from 54.161.191.154
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Print Page number on each page like 1 of 4 print
Print Page number footer row on each page
Areeb



 
Msg#: 4361859 posted 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);
}
}

 

penders

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



 
Msg#: 4361859 posted 12:03 pm on Sep 13, 2011 (gmt 0)

Doesn't the browser do this for you?

Areeb



 
Msg#: 4361859 posted 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.

penders

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



 
Msg#: 4361859 posted 8:24 am on Sep 14, 2011 (gmt 0)

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]

lucy24

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



 
Msg#: 4361859 posted 9:03 am on Sep 14, 2011 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved