On 11/11/2009 12:46 AM, Massimo Ugues wrote:
> Hallo all.
> I'm using CSS3 for pagination in print mode as described in the tutorial.
>
> @page {
> @bottom-center { content: "Page " counter(page) " of " counter
> (pages); }
> }
>
> This works fine but I would like to extract the text content from the css
> and put it in a div in the html page: something like this:
>
> <div id="footer" style=""> Page<span id="pagenumber"/> of<span
> id="pagecount"/> </div>
>
> So in my css I changed the @page directive in this way
>
> @page {
> @top-center { content: #footer; }
> }
>
> #pagenumber:before {
> content: counter(page);
> }
>
> #pagecount:before {
> content: counter(pages);
> }
>
> The before works fine but I cannot position the div id="footer" the the
> top-center of the page.
>
> Where is the problem?
content: #footer; is invalid. You can't grab content from the document
like that and put it in the header.
Why can't you just put the page counter info in the header, like before,
instead of trying to put it in a <div>?
@page {
@bottom-center { content: "Page " counter(page) " of " counter (pages); }
}
You can add other styles to @bottom-center if needed.
~fantasai
______________________________________________________________________
css-discuss [[email protected]]
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/