Forum Moderators: not2easy

Message Too Old, No Replies

Including a banner that isn't on the original page

CSS Printable Versions Includes

         

cathyrod

2:24 pm on Aug 8, 2003 (gmt 0)

10+ Year Member



I am attempting to create a printable version of a web page using CSS. What I would like to do is to put a different banner on the printable version than resides on the original web page. Any ideas on how to accomplish this?

BlobFisk

2:31 pm on Aug 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, cathyrod!

Print CSS is the way to go here. If there is an image on the website, and you want a different image when printed, use a background image on both, and just use the appropriate image in the screen and the print style calls.

HTH

cathyrod

4:02 pm on Aug 8, 2003 (gmt 0)

10+ Year Member



I got this sort of to work. My problem now is that the main text on my page starts at the same place the background image (page banner) does. So basically, they are sitting on top of each other. Ideas around that?

BlobFisk

4:05 pm on Aug 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Again, you can change the value for your maintext in your print stylesheet and this will fix the problem.

Ryan8720

4:20 pm on Aug 8, 2003 (gmt 0)

10+ Year Member



Put the banner and the text in their own div's.

<html>
<head>
<title></title>

<style type="text/css">
#banner {
postition: absolute;
top: 0;
left: 0;
width: 100%
height: 100px;
background: url(banner.gif) no-repeat;
}

#text {
postition: absolute;
top: 120px;
left: 0;
}

</style>
</head>
<body>

<div id="banner"></div>

<div id="text">

text text text text

</div>

</body>
</html>

Something similar to that should work fine for you.

cathyrod

4:51 pm on Aug 8, 2003 (gmt 0)

10+ Year Member



The next problem is that I only want this banner on the first page. I don't want it printing on every page. Is there anyway to control that. I aplogize, I am a beginner at this.

BlobFisk

9:12 am on Aug 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Link to a different print sheet on the front page that includes the banner, every other page's print CSS would not include this.

cathyrod

3:15 pm on Aug 11, 2003 (gmt 0)

10+ Year Member



It is just linked to one page, but the particular page prints several pages long. These are training documents so some of them can be quite lengthy.