defining an area in FP

K

Karin

I have inserted a print function in FP. Using <a
HREF="javascript:window.print()">PRINT</a></span></font>
I know that to be able to get the printer only to print certain areas of the
document I should change "window" with the name of the area. I would like the
printer only to print the bottom right corner in my FP (i'm using the second
layout form that FP offers). I have tried wiht the name ContentBody and
several others, however, it does not seem to work... Can you help me?
 
R

Ronx

Print will print the entire page, or none of it.
To limit the print function you would need to use CSS to hide areas of the
page from the printer.

Example, in the <head section of the page,

<style type="text/css" media="print">
#header,#left,#footer {display:none;}
</style>

where in the body you have delineated areas not to be printed by enclosing
them in <divs> or other containers that match the ids in the CSS

<body>
<div id="header">this will not be printed</div>
<div id="left">this will not be printed</div>
<div id="content">This area will be printed</div>
<div id="footer">this will not be printed</div>
</body>
 
K

Karin

Thanks for the help.
I have never used CSS before. So i'm a bit confused.
I inserted the below in the heading:

<style type="text/css" media="print">
#DecArea,#Navbody,#ContentBody,#Contenthead{display:none;}
</style>

And then the following just after the coding for the print.

<body>

<div id="DecArea">
this will not be printed</div>
<div id="NavBody">
this will not be printed</div>
<div id="ContentBody">
This area will be printed</div>
<div id="ContentHead">
this will not be printed</div>

</body>


the "this will not be printed" words appear on my html. page, and it does
not help the printer, it keeps printing the whole page..
I think i got something wrong, can you help?
Thanks alot!
Karin
 
R

Ronx

An entire page is below. You will have to adjust to suit your page.
In Code View:


<html>
<head>
<title>print this page</title>
<style type="text/css" media="print">
#DecArea,#Navbody,#Contenthead {display:none;}
</style>
</head>

<body>
<div id="Contenthead">This is a headings region that will show in the
browser, but will not be printed</div>
<div id="Navbody">This region holds the navigation for the page, it will
show in the browser, but will not be printed</div>
<div id="DecArea">No idea what goes here, but it will not be printed</div>
<div id="ContentBody">This is the page content. It will show in the
browser, and it will be printed</div>
<p>This is an extra that will be printed and shown in the browser</p>
</body>
</html>

The page http://www.rxs-enterprises.org/mainpage/links.html uses the above,
the CSS is slightly more complex since it sets the page size and removes
background images as well

<style type="text/css">
#wrapper {width:640px;background-image:none;}
#header,#left,#footer {display:none;}
#ctt {float:none; margin: 0;width:640px;}
</style>
 
K

Karin

Dear Ronx,

Sorry, i must be slow! I have tried figuring it out since i got the last
information from you, but i cannot get it to work.
I tried getting some good ideas from the website you send me, however, in
the source i cannot see the source you sent or what you meant by that site
having implemented:
"
<style type="text/css">
#wrapper {width:640px;background-image:none;}
#header,#left,#footer {display:none;}
#ctt {float:none; margin: 0;width:640px;}
</style>"

Am i wrong? Thanx, and once again, sorry!
 
R

Ronx

Please publish your page, and provide a link. Tomorrow morning (12 hours)
I will take a look.

The link I gave you has the CSS in an external file, designated by
<style type="text/css" media="print">
@import url(../_themes/rxsprint.css);
</style>

The file ../_themes/rxsprint.css contains the lines below.
 
K

Karin

Hi Ronx,

Thank you so much for your help, i really appreciate it! Unfortunately i'm
not capable of uploading the website as it is not open to the public but
meant to be presented only locally on a CDrom.

Karin
 
R

Ronx

Karin,
Can you zip up the page and associated files and email it to me at
ronx @ mvps.org (remove all spaces between ronx and org)?
 
K

Karin

I will! Thanks

Ronx said:
Karin,
Can you zip up the page and associated files and email it to me at
ronx @ mvps.org (remove all spaces between ronx and org)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top