How to avoid printing of border content

J

jnm

How can I avoid the content of

<meta name="Microsoft Border" content="b, default">

is printed, when printing by means of

<link rel="stylesheet" href="../print.css" type="text/css" media="print" />


The following code is an example my page

Thanks in advance

Joergen


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<meta http-equiv="Content-Language" content="en-us" />
<meta name="GENERATOR" content="Microsoft FrontPage 4.0" />
<meta name="ProgId" content="FrontPage.Editor.Document" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-store" />
<title>Page template</title>
<link rel="stylesheet" href="../body.css" type="text/css" />

<link rel="stylesheet" href="../print.css" type="text/css" media="print" />


<script type="text/javascript">
function SetCorners() {
LR.style.left = document.body.scrollLeft + document.body.clientWidth -
LR.width;
LR.style.top = document.body.scrollTop + document.body.clientHeight -
LR.height;
}
</script>
<meta http-equiv="imagetoolbar" content="false" />

<meta name="Microsoft Border" content="b, default">

</head>
<body onLoad="SetCorners()" onResize="SetCorners()" onScroll="SetCorners()">
<a href="javascript:scroll(0,0)"><img id="LR"
src="../images/system/Piloprod-tr.gif" border="0"
style="position: absolute; left.2; top:4" width="23" height="36" alt="To
top of page" /></a>
<center>
<div id="indhold">
<h6>Page template (Name of page, H6)</h6>
<p>It is of major importance to evaluate this in depth in order to ensure
that
Rimadan understand the issue and&nbsp;
</p>
<h2>Page bottom</h2>
</div>
</center>
&nbsp;</body>
</html>
 
A

Andrew Murray

Perhaps make a duplicate "print friendly" page - without the shared borders,
that is specifically the "print this page" copy.
 
J

jnm

Andrew Murray said:
Perhaps make a duplicate "print friendly" page - without the shared borders,
that is specifically the "print this page" copy.

Yes that is a possibility, but I don't like it. Lots of extra work to
maintain dublicate pages.
It must be possible to deactivate the common boarder via some script or
command in the print.css

Regards

Jorgen
 
T

Trevor L.

jnm said:
Yes that is a possibility, but I don't like it. Lots of extra work to
maintain dublicate pages.
It must be possible to deactivate the common boarder via some script
or command in the print.css

Regards

Jorgen

Well, why not set a class for the border, say
<div class="hidden">
<!-- border content here -->
</div>

Then in print.css, add
..hidden {visibility: hidden ;}

In your <head> section add
<link rel="stylesheet" type="text/css" href="style.css" /> <!-- or
whatever your main stylesheet is -->
<link rel="stylesheet" type="text/css" media="print" href="print.css" />

Works for me :))
 
J

jnm

Trevor L. said:
Well, why not set a class for the border, say
<div class="hidden">
<!-- border content here -->
</div>

Then in print.css, add
.hidden {visibility: hidden ;}

In your <head> section add
<link rel="stylesheet" type="text/css" href="style.css" /> <!-- or
whatever your main stylesheet is -->
<link rel="stylesheet" type="text/css" media="print" href="print.css" />

Works for me :))
--

Hi Trevor

Looks as a fine idea. I will look into it during the weekend.

Thanks a lot

Jorgen
 
J

jnm

Hello Trevor



I have tried to, but I do not understand the message.



I understand this

<link href="../print.css" rel="stylesheet" type="text/css" media="print"/>

has to be placed after the body.css in order to print from the browser.



It is also fine with the code to be placed in the print.css

..hidden {visibility:hidden;}



But I don't understand where you put the

<div class="hidden"><!-- border content here -- ></div>



Would you please show the code in the following stripped down code of a page
in my system.



Regards



Jorgen



A stripped down of my code looks like this:



<html>

<head>

<meta name="Microsoft Border" content="b, default">

<title>Page template</title>

<link href="../body.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

function SetCorners() {

LR.style.left = document.body.scrollLeft +
document.body.clientWidth - LR.width;

LR.style.top = document.body.scrollTop +
document.body.clientHeight - LR.height;

}

</script>

</head>

<body onLoad="SetCorners()" onResize="SetCorners()" onScroll="SetCorners()">

<h6>Page template</h6>

</body>

</html>



The JavaScript is controlling the navigation bar, which is made by
AllWebsMenu. The code is controlled by a file "bottom.htm" called by <meta
name="Microsoft Border" content="b, default"> and located in the folder
_boarder. The menu is placed in "menu.js"



The "bottom.htm" file looks like:



<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />

<meta http-equiv="Content-Language" content="en-us" />

<meta name="GENERATOR" content="Microsoft FrontPage 4.0" />

<meta name="ProgId" content="FrontPage.Editor.Document" />

<title>Fælles bundkant</title>

<meta name="Microsoft Border" content="none">

</head>

<body>

<!-- DO NOT MOVE! The following AllWebMenus code must always be placed right
AFTER the BODY tag-->

<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu ******** -->

<span id='xawmMenuPathImg-menu' style='position:absolute;top:-50px'><img
name='awmMenuPathImg-menu' id='awmMenuPathImg-menu' src='../awmmenupath.gif'
alt='' width="1" height="1"></span><script type='text/javascript'>var
MenuLinkedBy='AllWebMenus [4]', awmBN='624'; awmAltUrl='';</script><script
charset='UTF-8' src='../menu.js' language='JavaScript1.2'
type='text/javascript'></script><script
type='text/javascript'>awmBuildMenu();</script>

<!-- ******** END ALLWEBMENUS CODE FOR menu ******** -->

<!--webbot bot="purpletext"

preview="This border may be shown in all pages of the site. Insert your own
text."

-->

</body>

</html>



Thanks



Joergen
 
T

Trevor L.

jnm said:
But I don't understand where you put the
<div class="hidden"><!-- border content here -- ></div>

Would you please show the code in the following stripped down code of
a page in my system.

MY REPLY IS HERE
===============
I am not quite sure where to put the link as you use bottom.htm as well as
the main file.
To be safe, I have put it in both. Try removing it from each in turn to see
which is correct - I suspect it should be in bottom.htm

As for the class= "hidden", I put it into the <span> which contains the
image in the border, just after BEGIN ALLWEBMENUS CODE

The problem is that you also have a javascript menu and this could write
code into the border as well, but provided it writes it into the same span
(id='xawmMenuPathImg-menu') you should be OK.

But there is also this code
<!--webbot bot="purpletext" preview="This border may be shown in all pages
of the site. Insert your own text."-->
If this is to be suppressed on print, enclose it by
<span class='hidden'>
</span>

As I think I understood you to know,
print.css should contain:
..hidden {visibility: hidden ;}
REPLY ENDS HERE
===============
A stripped down of my code looks like this:
<html>
<head>
<meta name="Microsoft Border" content="b, default">
<title>Page template</title>
<link href="../body.css" rel="stylesheet" type="text/css" />

<!- ===========Link goes in the <head> =========================
<script type="text/javascript">
function SetCorners() {
LR.style.left = document.body.scrollLeft +
document.body.clientWidth - LR.width;
LR.style.top = document.body.scrollTop +
document.body.clientHeight - LR.height;
}
</script>
</head>
<body onLoad="SetCorners()" onResize="SetCorners()"
onScroll="SetCorners()">>
<h6>Page template</h6>
</body>
</html>
The "bottom.htm" file looks like:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" />
<meta http-equiv="Content-Language" content="en-us" />
<meta name="GENERATOR" content="Microsoft FrontPage 4.0" />
<meta name="ProgId" content="FrontPage.Editor.Document" />

<!- ===========Link goes in the <head> =========================
<title>Fælles bundkant</title>
<meta name="Microsoft Border" content="none">
</head>
<body>

<!-- DO NOT MOVE! The following AllWebMenus code must always be
placed right AFTER the BODY tag-->

<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu ******** -->

<span id='xawmMenuPathImg-menu'
class='hidden'

style='position:absolute;top:-50px'><img name='awmMenuPathImg-menu'
id='awmMenuPathImg-menu' src='../awmmenupath.gif' alt='' width="1"
height="1"></span><script type='text/javascript'>var
MenuLinkedBy='AllWebMenus [4]', awmBN='624';
awmAltUrl='';</script><script charset='UTF-8' src='../menu.js'
language='JavaScript1.2' type='text/javascript'></script><script
type='text/javascript'>awmBuildMenu();</script>

<!-- ******** END ALLWEBMENUS CODE FOR menu ******** -->

<!--webbot bot="purpletext"
preview="This border may be shown in all pages of the site. Insert
your own text."
-->
</body>
</html>
 
J

jnm

"Trevor L." <Trevor L.@Canberra> skrev i en meddelelse

Hello Trevor

Thank you for your help, but I am not able to get it working. I think I
understand your idea, but I am not experienced enough as programmer to see
what is wrong.

I think that the basic problem to be solved is this

How do I by means of some code in
<link href="../print_body.css" rel="stylesheet" type="text/css"
media="print"/>
prevent
<meta name="Microsoft Border" content="b, default">
to be active??

In order to continue my work, I have settled for a solution, which allows
for the AllWebsMenu to be printed at the top of the first page of each
document, although it looks ugly in the printed page.

May a solution show up in the future?
Regards
Jorgen
 
T

Trevor L.

Jorgen

Some replies in-line
"Trevor L." <Trevor L.@Canberra> skrev i en meddelelse

Hello Trevor

Thank you for your help, but I am not able to get it working. I think
I understand your idea, but I am not experienced enough as programmer
to see what is wrong.

I think that the basic problem to be solved is this

How do I by means of some code in
<link href="../print_body.css" rel="stylesheet" type="text/css"
media="print"/>
prevent
<meta name="Microsoft Border" content="b, default">
to be active??

I think the answer is:
Do not try.
You need this meta tag to invoke the shared border. So let the shared border
be created but with a class which will cause it to not be printed.
In order to continue my work, I have settled for a solution, which
allows for the AllWebsMenu to be printed at the top of the first page
of each document, although it looks ugly in the printed page.

May a solution show up in the future?

As I say, what you need to do is to place the border in a set of tags <div
class="hidden"></div> or <span class="hidden"></span>.

But there is a lot of interaction taking place with both shared borders and
the AllWebsMenu, so I don't know exactly where to place it.

Can you post the URL of your site. Then perhaps I or some expert on the NG
could make suggestions.
(I am not one of those experts, just someone who has used a CSS class
..hidden quite successfully.)
 
J

jnm

Hi Trevor

I will try to publish a sample of my intranet solution during the next
couple of days, and then ask the question again.
Thanks
Jorgen
 

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