Forum How do I...?

Newbie Footer Question

JoeT
Greetings....

I need to create a footer that appears on all the pages of a document.

The footer has to contain a copyright notice (3-4 lines of text) and, in the footer as well, the page number.

I can create the page number easily by using the @bottom-right w/content.
I can create the copyright using @bottom-left w/content. No problem here either.
Problem is I can't get both to work together at the same time.

Can anyone explain to me what I need to do? I'm obviously missing something.

PS: I'm actually a database guy; this is a 'new' task I've been assigned and I admit that my HTML/CSS skills are not anywhere near professional.

TIA,
Joe
mikeday
Can you paste your CSS? You should be able to set arbitrary content in different page margin boxes at the same time.
JoeT
Hi....

Problem is that I know what I want to do, but not how to implement it.
I have this:

@page {
size: A4;
margin: 0pt 0pt 50pt 0pt;
@bottom-right {
border-top: black solid 1px;
font-family: tahoma;
font-size: 8pt;
content: "Page " counter(page) " of " counter(pages);
color: #343434;
}
}

which does the page number. What would be ideal is something like:

@page {
size: A4;
margin: 0pt 0pt 50pt 0pt;
@bottom-right {
border-top: black solid 1px;
font-family: tahoma;
font-size: 8pt;
content: "Page " counter(page) " of " counter(pages);
color: #343434;
}
@bottom-left {
border-top: black solid 1px;
font-family: tahoma;
font-size: 8pt;
content: "(c) 2011 Blah blah blah....."
color: #343434;
}

This does not work. Not sure what to try next.

As an aside, this copyright and page footer has to appear on all the pages. Not sure if that makes it more difficult or not.

Joe
mikeday
That should work. What do you get if you try a really simple example like this:
@page {
    @bottom-left { content: "left-footer" }
    @bottom-right { content: "right-footer" }
}
jim_albright
Looks like you need one more

}

It really will work.

Jim Albright
Wycliffe Bible Translators

JoeT
You're right, it will work.
Sort of.

Take the "copyright" and make it a long string. Definitely longer than the width of the page. The page number will appear on the right, but it will (in my case) be on 3-lines, squished against the right margin. Like this (vertical bar is the margin):

Page|
1 of|
1|

Joe
mikeday
So the problem is that the copyright text needs line breaks? These can be added with a \A escape in the string, like this:
@bottom-left {
    content: "This will be on\A more than one\A line";
    white-space: pre-line
}
jim_albright
Did you try Michael's short sample? It really should work.
Make sure your CSS is valid. One missing } will through it off.
You do not need to resort to any tricks.

@page:left {
    	margin: 4pc 1.5pc 2pc 2pc;
    @top-left {
        content: string(bookx, start) " "  string(startChapterx, start) ":" string(startVersex, start) ;  
    }
    @top-right {   	content: counter(page);
    }
 }/* end page left*/



header.png

Jim Albright
Wycliffe Bible Translators

  1. header.png6.1 kB
JoeT
OK...with the earlier suggestion of adding the \A, it works.

Thanks much!

Joe