Forum How do I...?

Problem with @page

Boris
Hi,

I've got a problem using @page.

Here is my code :
@page {
	size:				A4 portrait;
	padding-left:		180px;
	padding-top:		70px;
	
	@top-center {
		background-image:url(../images/logos/header_print.jpg);
		color:			#FFF;
		content:		string(doctitle);
		font-family:	Verdana;
		font-size:		18px;
		margin-top:		120px;
		padding-left:	270px;
		text-align:		center;
		vertical-align:	middle;
	}
	
}

#header h1 {
	string-set:			doctitle content();
}


Nevertheless, if my h1 is too long to be read on 1 line, it does not appear on 2 lines, it's truncated. Is there any way to have it on 2 lines ?

Thanks !
mikeday
The problem is the "margin-top: 120px" on the @top margin box. Try commenting this out, and add some borders to make it clear where everything is, eg. "border: solid red thin" on the @page and "border: solid blue thin" on the @top margin box. The text should work fine now. If you put back the margin at 60px, 80px, you will see that it is gradually consuming all the available space, leaving no room for the second line. If you really want to push the margin box that far down you will need to increase the page top margin as well, to leave room for it.
Boris
Ok I think I've got it !

I'll give this solution a try and will tell you whether it seems to work for me or not ;)

Thanks Mike !