This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > August 2006 > Page stationery in CSS





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Page stationery in CSS
Axel Dahmen

2006-08-07, 6:34 pm

Hi,

I'm trying to create a print layout for my web content. The stationery for
the printed sheet contains four images, each to be put in one of the printed
page's four corners:

|--------------|
|***** ###|
| |
| |
| |
| |
| |
| |
|=== ~~|
|--------------|

So far I thought the @Page directive would do the job. Apparently it
doesn't. The images only appear on the first page. What am I doing wrong
here?

Thanks for enlightening me
Axel Dahmen



----------------------
This is the code I'm using:

@media print
{
.printImg
{
display: inline;
position: absolute;
z-index: -1;
}

#ltImg
{
left: 0;
top: 0;
}

#rtImg
{
right: 0;
top: 0;
}

#lbImg
{
left: 0;
bottom: 0;
}

#rbImg
{
right: 0;
bottom: 0;
}


#Letter_divPage
{
border: 0;
width: 100%;
margin: 0;
z-index: -2;
}

#Letter_divAddress, #Letter_divContent
{
background-color: transparent;
z-index: 2;
}
}


@page
{
position: relative;
margin: 0;
padding: 0;
}




Jeremy

2006-08-08, 10:37 pm

Axel Dahmen wrote:
> Hi,
>
> I'm trying to create a print layout for my web content. The stationery for
> the printed sheet contains four images, each to be put in one of the printed
> page's four corners:
>
> |--------------|
> |***** ###|
> | |
> | |
> | |
> | |
> | |
> | |
> |=== ~~|
> |--------------|
>
> So far I thought the @Page directive would do the job. Apparently it
> doesn't. The images only appear on the first page. What am I doing wrong
> here?


It seems to me that even though you have the images styled properly,
there is still the problem that each element exists only once - so is
printed only once. It's true that because of your CSS, the images
should snap to the bounds of whichever page is being printed - but my
guess is that the browser isn't calculating this.

Have you tried position: fixed, rather than position: absolute, for the
images that you want on every page? That would make more sense to me
than absolute.

Jeremy
Axel Dahmen

2006-08-09, 7:14 pm

Yeah, tried this, but to no avail... :/


-------------
"Jeremy" <jeremy@pinacol.com> schrieb im Newsbeitrag
news:HebCg.144$xB.80@fed1read10...
> Axel Dahmen wrote:
for[color=darkred]
printed[color=darkred]
>
> It seems to me that even though you have the images styled properly,
> there is still the problem that each element exists only once - so is
> printed only once. It's true that because of your CSS, the images
> should snap to the bounds of whichever page is being printed - but my
> guess is that the browser isn't calculating this.
>
> Have you tried position: fixed, rather than position: absolute, for the
> images that you want on every page? That would make more sense to me
> than absolute.
>
> Jeremy



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews