Page does not print using css

G

Guest

Please help - I cannot get my page to print correctly.

I am using a dwt and attatching it to any new pages
that I create. I want all pages to print only the
'page-contents' section leaving out logo,navigation,counter.

Either it prints the whole page or 'print' is greyed out as it is now.

What am I doing wrong?

Could the same style sheet be used to make pages accessable by people using
screen readers?

Code is below

Thanks

Viv

Main Page

<html>

<!-- #BeginTemplate "../wylie-template2.dwt" -->

<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" href="../print2.css" type="text/css" media="print">
<!-- #BeginEditable "doctitle" -->
<title>Wylie Web Template</title>
<!-- #EndEditable -->

<script language="JavaScript">
<!--
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs=new Image;
d.FP_imgs.src=a; }
}

function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2;
n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) {
doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById)
el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return
el; } }
return null;
}
// -->
</script>
<style fprolloverstyle>A:hover {color: #808000; font-family: Arial;
font-size: 12pt}
</style>
</head>

<body background="../graphics/cellar.jpg" style="background-attachment:
fixed; font-family:Arial; background-image:url('../graphics/cellar.jpg');
color:#000000" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"
marginwidth="0" marginheight="0"
onload="FP_preloadImgs(/*url*/'../graphics/button48.gif',
/*url*/'../graphics/button47.gif', /*url*/'../graphics/button22.gif',
/*url*/'../graphics/button21.gif', /*url*/'../graphics/button42.gif',
/*url*/'../graphics/button41.gif', /*url*/'../graphics/button45.gif',
/*url*/'../graphics/button44.gif', /*url*/'../graphics/button19.gif',
/*url*/'../graphics/button18.gif')" link="#800000" vlink="#800000"
alink="#800000">

<br>

<div align="center">
<div align="center">
<table border="0" cellspacing="0" width="90%" style="border: 2px solid
#808000; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px" bgcolor="#FFFFFF">
<tr>
<div id="logo">
<td align="center"><br>
<img border="0" src="../graphics/logo2.jpg" width="326" height="56"><br>
</td>
</div>
</tr>
<div id="navigation">
<tr>
<td align="center" height="35">
<!--webbot bot="Include" U-Include="../included-files/topnav2.htm"
TAG="BODY" --></td>
</tr>
</div>
<div id="page-content">
<tr>
<td align="center">
<!-- #BeginEditable "page-content" -->
<br>
<table border="0" cellspacing="0" width="100%">
<tr>
<td>Please note that we do not take credit cards. This is
because many of our deliveries are made to third party
addresses. This especially applies to overseas orders. In
either case the potencial purchaser has up to 3 months to
challenge the validity of the purchase and we prefer not to
be kept in limbo for this length of time.<p>We are sorry if
you had wanted to pay in this way and this inconveniences
you but we hope you will appreciate our reasons, and will
continue with your order with payment either by cheque (U.K.
bank account) or by wire transfer.<br>
<br>
For our bank details - please click
Here<br>
<br>
</td>
</tr>
</table><!-- #EndEditable --></td>
</tr>
</div>
<tr>
<div id="navigation2">
<td align="center">
<!--webbot bot="Include" U-Include="../included-files/text-nav2.htm"
TAG="BODY" --></td>
</tr>
</div>
</table>
</div>
<p><br>
</p>
<p>


<!-- #BeginEditable "counter" -->
<div id="counter">
<table border="0" cellspacing="0" width="100%">
<!-- MSTableType="nolayout" --><tr>
<td>
<p align="left">
<!-- begin wundercounter.com code -->
<NOSCRIPT><img
src="http://www.wundercounter.com/cgi-bin/stats/image.cgi?user=peterwylie&page=1919.htm&digits=0" width=1 height=1>
</NOSCRIPT>

<script type="text/javascript" language="JavaScript">
<!--
var reF=document.referrer;
var wS=screen.width;
var hS=screen.height;
var cS=screen.colorDepth;
var hisl=history.length;
document.write('<img src=');
document.write('"http://www.wundercounter.com/cgi-bin/stats/image.cgi?');
document.write('user=peterwylie&page=1919.htm&digits=0&reF='+reF+'&wS='+wS+'&hS='+hS+'&cS='+cS+'&hisl='+hisl+'"');
document.write('width=1 height=1>');
// -->
</script>

</td>
</tr>
</table></div>
<!-- #EndEditable Counter-->
</div>
</body>

<!-- #EndTemplate -->

</html>


Cascading Style Sheet for print (print2.css)

body {
color : #000000;
background : #ffffff;
font-family : "Times New Roman", Times, serif;
font-size : 12pt;
}
a {
text-decoration : underline;
color : #0000ff;
}
#doctitle, #logo, #navigation, #navigation2, #counter {
display : none;
}
 
C

Chris Leeds, MVP-FrontPage

here's something that'll get you headed in the right direction:
http://www.alistapart.com/articles/goingtoprint/

there are other articles on that site about the same topic too.

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
VivD said:
Please help - I cannot get my page to print correctly.

I am using a dwt and attatching it to any new pages
that I create. I want all pages to print only the
'page-contents' section leaving out logo,navigation,counter.

Either it prints the whole page or 'print' is greyed out as it is now.

What am I doing wrong?

Could the same style sheet be used to make pages accessable by people using
screen readers?

Code is below

Thanks

Viv

Main Page

<html>

<!-- #BeginTemplate "../wylie-template2.dwt" -->

<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" href="../print2.css" type="text/css" media="print">
<!-- #BeginEditable "doctitle" -->
<title>Wylie Web Template</title>
<!-- #EndEditable -->

<script language="JavaScript">
<!--
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs=new Image;
d.FP_imgs.src=a; }
}

function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2;
n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) {
doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById)
el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return
el; } }
return null;
}
// -->
</script>
<style fprolloverstyle>A:hover {color: #808000; font-family: Arial;
font-size: 12pt}
</style>
</head>

<body background="../graphics/cellar.jpg" style="background-attachment:
fixed; font-family:Arial; background-image:url('../graphics/cellar.jpg');
color:#000000" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"
marginwidth="0" marginheight="0"
onload="FP_preloadImgs(/*url*/'../graphics/button48.gif',
/*url*/'../graphics/button47.gif', /*url*/'../graphics/button22.gif',
/*url*/'../graphics/button21.gif', /*url*/'../graphics/button42.gif',
/*url*/'../graphics/button41.gif', /*url*/'../graphics/button45.gif',
/*url*/'../graphics/button44.gif', /*url*/'../graphics/button19.gif',
/*url*/'../graphics/button18.gif')" link="#800000" vlink="#800000"
alink="#800000">

<br>

<div align="center">
<div align="center">
<table border="0" cellspacing="0" width="90%" style="border: 2px solid
#808000; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px" bgcolor="#FFFFFF">
<tr>
<div id="logo">
<td align="center"><br>
<img border="0" src="../graphics/logo2.jpg" width="326" height="56"><br>
</td>
</div>
</tr>
<div id="navigation">
<tr>
<td align="center" height="35">
<!--webbot bot="Include" U-Include="../included-files/topnav2.htm"
TAG="BODY" --></td>
</tr>
</div>
<div id="page-content">
<tr>
<td align="center">
<!-- #BeginEditable "page-content" -->
<br>
<table border="0" cellspacing="0" width="100%">
<tr>
<td>Please note that we do not take credit cards. This is
because many of our deliveries are made to third party
addresses. This especially applies to overseas orders. In
either case the potencial purchaser has up to 3 months to
challenge the validity of the purchase and we prefer not to
be kept in limbo for this length of time.<p>We are sorry if
you had wanted to pay in this way and this inconveniences
you but we hope you will appreciate our reasons, and will
continue with your order with payment either by cheque (U.K.
bank account) or by wire transfer.<br>
<br>
For our bank details - please click
Here<br>
<br>
</td>
</tr>
</table><!-- #EndEditable --></td>
</tr>
</div>
<tr>
<div id="navigation2">
<td align="center">
<!--webbot bot="Include" U-Include="../included-files/text-nav2.htm"
TAG="BODY" --></td>
</tr>
</div>
</table>
</div>
<p><br>
</p>
<p>


<!-- #BeginEditable "counter" -->
<div id="counter">
<table border="0" cellspacing="0" width="100%">
<!-- MSTableType="nolayout" --><tr>
<td>
<p align="left">
<!-- begin wundercounter.com code -->
<NOSCRIPT><img

src="http://www.wundercounter.com/cgi-bin/stats/image.cgi?user=peterwylie&pa
ge=1919.htm&digits=0" width=1 height=1>
 

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