Putting 2 lines in the footer
Hi,
I wanted to put 2 lines in a footer, ie Line1<br>Line2. I'm pretty sure this isn't possible but just checking. If not does anyone have a hack to get around this. Either that or a way to put more than one space between content - if i put multiple spaces in between words, it takes out the multiple and just leaves one.
Try the white-space property, which allows you to disable white-space collapsing:
white-space: pre
You can embed a literal new-line character in a CSS string like this:
content: "Two\A lines"
Where \A is a hexadecimal character escape, equivalent to 
 in XML.
Thanks for that. \A didn't work, it just printed out "A", but \n worked.
Really? That's odd, as "\n" should only create a newline in a C/Java/Perl program, not in CSS!
Could you perhaps post an example of the CSS that you are using?
It is a p erl program that is printing to Prince.
@bottom-left {
content: "Page " counter(page) " of " counter(pages) "\nPrinted: $date";
vertical-align: top;
text-align: left;
font-family: Arial, sans-serif;
font-size: 10px;
white-space: pre;
}
Ah, if it's a Perl program then it would need to print "\\A" in order to get "\A" in the CSS output.
An interesting bug: "foo\A bar" works, but "foo\Abar" does not.
John Haugeland is http://fullof.bs/
Not a bug: \Ab or \AB is a two digit hexadecimal escape for U+00AB.
Good call. \0A, then.
John Haugeland is http://fullof.bs/
I am interesting if \a (lower case) would work or not?
Sorry to drag up an old post, but I am having similar issues.
I am trying to get multiple lines, but failing miserably. I'm coding in PHP, I have tried the following:
'\\A'
'\A'
"\A"
"\\A"
'\n'
"\n"
'\\n'
"\\n"
$head.=$moreInfo.'\A'.$custPo.'Phase PO#:'.$row['phasePo']
Any suggestions?
Never mind, I found the answer in a different post.
I forgot the "white-space:pre-line"
@page{
@top-left{
content: "'.$head.'";
white-space:pre-line
}
}