navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

CSS

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> CSS
Page: [1]
 
Toolman

 

Posts: 203
Joined: 3/14/2002
From: United Kingdom
Status: offline

 
CSS - 3/28/2003 12:07:51   
Is it possible to specify a selected area of a page using a style sheet so that I can then use that sheet when printing off a page.

Thanks:)




_____________________________

Toolman
" ....It was like that when I got Here!"
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: CSS - 3/28/2003 12:33:42   
You can specify specific styles for printed pages in CSS... though I' ve never done it personally I know a lot of people use it.

There may be some info under CSS at www.w3schools.com or try searching the forums for CSS + print

It' s not specifying a page area... but rather a style specifically for a print call I believe...

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 3/28/2003 15:38:12   
Design 2 CSS for your site...

#1 - for screen/monitor
#2 - for print

Then put these in between your head tags...

<link rel=" stylesheet"  type=" text/css"  href=" ../style/style.css"  media=" screen" >
<link rel=" stylesheet"  type=" text/css"  href=" ../style/print.css"  media=" print" >
-- you can also use @import if you want.....with some limitations in NN

And here in an article describing the whole process...

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: CSS - 3/28/2003 16:17:55   
nice Jay...

:)

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 3/28/2003 19:14:48   
:)

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
Toolman

 

Posts: 203
Joined: 3/14/2002
From: United Kingdom
Status: offline

 
RE: CSS - 3/29/2003 7:29:51   
Bobby, justjay
Thanks for the reply and the info.
Jay I had already looked at the link page you provided and I have already set up the 2 style sheets. What I need to know is can I specify an area of the page using a style sheet or is there another way of doing this so that when someone tries to print out a web page I can specify which part of the page to print.

Cheers:)



_____________________________

Toolman
" ....It was like that when I got Here!"

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 3/29/2003 9:19:23   
The only way I can think of to do it is to use this phpPRINT Script here

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
Toolman

 

Posts: 203
Joined: 3/14/2002
From: United Kingdom
Status: offline

 
RE: CSS - 3/29/2003 10:25:47   
Thanks Jay
I have tried this and cannot get it to work.
I have added in the hyperlink to the phpPrint.php page on my page that I want printed.
Does it have to go anywhere special, eg header, footer etc.
Do I have to use the link to print the page?
The page is in the root of my web as is the .php page

Cheers:)



_____________________________

Toolman
" ....It was like that when I got Here!"

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 3/29/2003 11:15:12   
Did you add the <!--start print --> and <!--stop print--> comment tags???

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
Toolman

 

Posts: 203
Joined: 3/14/2002
From: United Kingdom
Status: offline

 
RE: CSS - 4/1/2003 1:52:08   
Jay
Thanks for the reply
Yes I did but it still wont work.
I have reduced the width of the tebles on my page and I can now get the page to print out OK.

Thanks for all your help :)


_____________________________

Toolman
" ....It was like that when I got Here!"

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/1/2003 7:49:33   
Do you have a URL we can look at?

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
Toolman

 

Posts: 203
Joined: 3/14/2002
From: United Kingdom
Status: offline

 
RE: CSS - 4/2/2003 4:29:46   
Sorry no.
This is an intranet and not internet site.

Thanks

_____________________________

Toolman
" ....It was like that when I got Here!"

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/2/2003 7:16:43   
Well then here is a question - does your intranet have PHP? Didn' t realise you were on an intranet...

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
Toolman

 

Posts: 203
Joined: 3/14/2002
From: United Kingdom
Status: offline

 
RE: CSS - 4/2/2003 9:56:39   
Jay
Dont know Ime afraid.
Is this something that runs on the server like ASP?
If so do you have to install it with the FP server extensions or is it done automatically?
Excuse my ignorance on this matter I have not come across this before:)

Cheers

_____________________________

Toolman
" ....It was like that when I got Here!"

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/2/2003 10:42:38   
PHP runs on *nix servers, ASP (MS) runs on IIS, Apache ASP runs on Apache *nix servers, FPSE are FrontPage server extensions.

Well me last suggestion to get just a certain part of a page to work is to use the PRINT ALTERNATE document tag. What you need to do is create a different page with ONLY the data you want users/visitors to be able to print, then add this tag into the <head> of your file --

<link rel=alternate media=print href=" _print/print.htm" >


--the part in bold you need to change to reflect where your alternate document is.... HTH

< Message edited by justjay -- 4/2/2003 10:43 AM >


_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
SerenityNet

 

Posts: 1364
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: CSS - 4/3/2003 1:23:02   
quote:


<link rel=alternate media=print href=" _print/print.htm" >

This link would be way cool, but when I put it in a page then I just can' t print. The print dialog won' t open from the File menu. The print buttons do nothing. I can' t even open the Print Preview. It' s doing something, but what? This is all in IE6. With NS7 I can print, but it just prints the page I told it to print; not the alternate page.

I' ve tried it with htm, asp, and php extensions. The tag is within the <head> tags. Ideas?

Andrew


_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to Justjay)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/3/2003 7:26:22   
Did you create the alternate document and change the href to reflect your document?

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
SerenityNet

 

Posts: 1364
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: CSS - 4/3/2003 10:26:37   
Yes.

Here is the code for page one:
<html>
<head>
<title>Printer Friendly Printing</title>

<link rel=alternate media=print href=" PageToPrint.htm" >

</head>

<body>
<p><b><font color=" #000080" >Try to print this page and you should really print <a href=" PageToPrint.htm" >this
one</a>.</font></b></p>
<p><b><font color=" #000080" >See JustJay' s post on <a href=" http://www.frontpagewebmaster.com/tm.asp?m=127056" >this</a>
thread.</font></b></p>
</body>
</html>


Here is the code for page two (the one to print):
<html>
<head>
<title>Page to Print</title>
</head>
<body>

<p><font color=" #000080" ><b>This is the page that should print when you try to
print the OpenMeFirst.htm document.</b></font></p>
<p>The quick brown fox jumped over the lazy dog.  The quick brown fox
jumped over the lazy dog.  The quick brown fox jumped over the lazy
dog.  The quick brown fox jumped over the lazy dog.  The quick brown
fox jumped over the lazy dog.  The quick brown fox jumped over the lazy
dog.  The quick brown fox jumped over the lazy dog.  The quick brown
fox jumped over the lazy dog.  The quick brown fox jumped over the lazy
dog.  </p>

</body>
</html>


What have I missed?

Thanks,
Andrew


_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to Toolman)
Gil

 

Posts: 7533
From: North Carolina, USA
Status: offline

 
RE: CSS - 4/3/2003 10:59:22   
Look here: http://www.siteexperts.com/tips/styles/ts41/page1.asp

_____________________________

Gil Harvey, 1947-2004

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/3/2003 11:25:02   
I threw [this] together and its working...

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
SerenityNet

 

Posts: 1364
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: CSS - 4/3/2003 11:59:01   
Hmmmm. It' s not working for me, either by clicking on the " print this page" link or by using the File/Print menu - see the error below. (Note that the error only appears if I click on the " print this page" link.) I get the same symptoms as with the original <head> code. I can' t get a print dialog or anything from that page in IE6. In NS7 it just prints the first page and not the ugly second page that is is supposed to print.

:)

Attachment (1)

_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to Toolman)
Gil

 

Posts: 7533
From: North Carolina, USA
Status: offline

 
RE: CSS - 4/3/2003 12:37:34   
The example at the link I posted above worked perfect for me...

_____________________________

Gil Harvey, 1947-2004

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/3/2003 12:51:21   
Okay here is the code from the FIRST Page...
<html>

<head>
<meta http-equiv=" Content-Language"  content=" en-ca" >
<!--this page provided courtesy of thejehm.net - http://www.thejehm.net-->
<meta http-equiv=" Content-Type"  content=" text/html; charset=windows-1252" >
<link rel=" stylesheet"  type=" text/css"  href=" ../../style/jehm_css.css" >
<link rel=alternate media=print href=" print.htm" > 

<script type=" text/javascript" >
<!-- Begin
function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}
//  End -->
</script>
</head>

<body>

<p><a class=" highlight"  href=" javascript:printWindow()" >Print this page</a> and see what happens ----> View the source code of this 
page...then loot at the source code of the page that is set to
<a class=" highlight"  href=" http://www.thejehm.net/look/serenity/print.htm" >print</a> (http://www.thejehm.net/look/serenity/print.htm) </p>
<p> </p>

<!--webbot bot=" Include"  U-Include=" ../credit.html"  TAG=" BODY"  startspan -->

<div align=" center" >
  <table border=" 1"  cellpadding=" 0"  cellspacing=" 0"  width=" 100%"  id=" table1"  style=" border-width: 0" >
    <tr>
      <td style=" border-style: none; border-width: medium" >
      <p align=" center" >This page provided courtesy of...</td>
    </tr>
    <tr>
      <td style=" border-style: none; border-width: medium" >
      <p align=" center" ><a href=" http://www.thejehm.net" >
      <img border=" 0"  src=" ../images/logo-sm.gif"  alt=" thejehm.net"  width=" 200"  height=" 70" ></a></td>
    </tr>
    <tr>
      <td style=" border-style: none; border-width: medium" >
      <p align=" center" >Visit us at www.<a href=" http://www.thejehm.net" >thejehm.net</a></td>
    </tr>
  </table>
</div>

<!--webbot bot=" Include"  i-checksum=" 12647"  endspan --><p> </p>

</body>

</html>


And the screen shot - and I am not having any of the problems you are and I have NO idea why...:)

:)

Attachment (1)

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/3/2003 12:54:05   
Here is one without the JS

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
SerenityNet

 

Posts: 1364
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: CSS - 4/3/2003 14:36:01   
Same thing - neither the print button nor File/Print works. Nothing happens - no dialog, no error, nothing.

Could it be a browser setting?


_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/3/2003 14:45:12   
Well I am thinking it is...and I would have NO idea where to begin, because I KNOW FOR A FACT that Gil turns off just about everything and I leave just about everything on....

Gill -- you want to hazard a guess?

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to SerenityNet)
Gil

 

Posts: 7533
From: North Carolina, USA
Status: offline

 
RE: CSS - 4/3/2003 14:49:09   
No idea - works here w/ IE, NN & Opera

_____________________________

Gil Harvey, 1947-2004

(in reply to Toolman)
SerenityNet

 

Posts: 1364
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: CSS - 4/3/2003 15:36:33   
Hmmmm again. I tried it from my work PC (I' m working from home today) - same firewall, same version of IE, just running through VPN is about the only difference. I' m running Win2K on both PC' s. It works on my work laptop, but not my home desktop. However, it does take about 30 seconds for the print dialog to appear. Also, I don' t get the error on my work PC.

Does this give you any ideas?




_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to Toolman)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: CSS - 4/3/2003 20:07:46   
MMM I think you broke the Internet :)

Seriously - I have no idea...it has to be a setting you have at home and not at work....

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to Toolman)
SerenityNet

 

Posts: 1364
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: CSS - 4/3/2003 23:20:34   
quote:

I think you broke the Internet

Please don' t tell Al Gore. The inventor might stone me with chads.

Thanks for the help. I' ll check it out when I have more time.


_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to Toolman)
Page:   [1]

All Forums >> Web Development >> General Web Development >> CSS
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts