Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing w/o borders and footers

Status
Not open for further replies.

YodaMan81

Technical User
Jul 8, 2003
94
0
0
US
I am quite sure I am in the wrong forum but it has done me well before :)
I am trying to generate a letter online using information from our database as well as info inputted by a user. I have a page where the top (letter head if you will) has the info generated by the db. The "Address to" has 4 input text boxes. The body of the letter is same for all users.

After the user enters in all the info I want them to be able to print the letter without the header and footers that are automatically generated by the browser.
Also another problem I run into is that the input boxes all have borders that print on the page. How can I have it so that the boxes dont get printed on the page.

Any suggestions?

I have been advised to use css but I dont know how it works at all. I have used the following code within my trials and none of them have worked:
1.
<LINK href=&quot; type=&quot;text/css&quot; media=&quot;print&quot; rel=&quot;STYLESHEET&quot;>

2. I tried this one just so that the borders would not print...it didnt work for me either.

<style type=&quot;text/css&quot;>
p
{
border: none;
}
</style>

Thanks!
 
Ok so I had a new trial.

On my main page I am using these two files:

<link href=&quot;sfmenu.css&quot; type=&quot;text/css&quot; rel=&quot;STYLESHEET&quot; media=&quot;print&quot;>
<link href=&quot;print.css&quot; type=&quot;text/css&quot; rel=&quot;STYLESHEET&quot; media=&quot;print&quot;>


and below is the print.css

<html>
<head>

<style type=&quot;text/css&quot;>
p
{
border: none
}
</style>

</head>

</html>

So yea that didnt do much either. Just thought that this might provide more info. Thanks
 
Ok I know this is going to seem a bit ridiculous that I have been responding to myself the whole time. But I got the border issue resolved using the following css file:

<html>
<head>

<style type=&quot;text/css&quot;>
p
{ border: none; }
input { border:none; }
</style>

</head>

</html>

Now I just need to know how to print this page without the footer that has the website name on it. Thanks
 
To take of the header and footer you need to disable that in the browser, you can't disable that part from a webpage in a simple way. This means that anyone printing the letter needs to turn off or blank out the header and footer settings in the printing setup of the browser.

Erwin Oosterhoorn
Analyst Programmer,
ice hockey player/fan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top