Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 7th, 2006, 01:55 PM
Axel Dahmen
Guest
 
Posts: n/a
Default Page stationery in CSS

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;
}




  #2  
Old August 9th, 2006, 02:45 AM
Jeremy
Guest
 
Posts: n/a
Default Re: Page stationery in CSS

Axel Dahmen wrote:
Quote:
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
  #3  
Old August 9th, 2006, 08:15 PM
Axel Dahmen
Guest
 
Posts: n/a
Default Re: Page stationery in CSS

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


-------------
"Jeremy" <jeremy@pinacol.comschrieb im Newsbeitrag
news:HebCg.144$xB.80@fed1read10...
Quote:
Axel Dahmen wrote:
Quote:
Hi,

I'm trying to create a print layout for my web content. The stationery
for
Quote:
Quote:
the printed sheet contains four images, each to be put in one of the
printed
Quote:
Quote:
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

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles