473,804 Members | 2,986 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to avoid printing a footer on a web page

I want to know if any style or tag is available to avoid printing
footer on a web page. I know that we can have two style sheets, one for
print media and other for screen and in the stylesheet for print media,
we can provide a style {display:none} to the footer to avoid it getting
printed. What is the best way to achieve this?

Nov 23 '05 #1
7 1978
On Wed, 16 Nov 2005 17:03:41 +0100, <ma*******@yaho o.com> wrote:
I want to know if any style or tag is available to avoid printing
footer on a web page. I know that we can have two style sheets, one for
print media and other for screen and in the stylesheet for print media,
we can provide a style {display:none} to the footer to avoid it getting
printed. What is the best way to achieve this?


What is the footer you refer to? If it is the one the browser adds to
identify the page, you can't touch that. If it is a footer of some sort
that is part of your page, add display:none; to the styles in your print
style sheet for the block level element that is used to either contain or
create that footer.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Nov 23 '05 #2
The footer consists of navigation links and copy right info.

Nov 23 '05 #3
ma*******@yahoo .com wrote:
I want to know if any style or tag is available to avoid printing
footer on a web page. I know that we can have two style sheets, one
for print media and other for screen and in the stylesheet for print
media, we can provide a style {display:none} to the footer to avoid
it getting printed. What is the best way to achieve this?


Check the recent threads initiated by Rhino. Subject lines are
appropriate. Print style sheets are discussed.

#footer { display: none; }

--
-bts
-Warning: I brake for lawn deer
Nov 23 '05 #4
Are the following stylesheet links work in all browsers to achive this
purpose?
<link rel="stylesheet " type="text/css" media="print" href="print.css "
/>
<link href="style.css " type="text/css" media="screen" rel="stylesheet ">

Nov 23 '05 #5
ma*******@yahoo .com wrote:
Are the following stylesheet links work in all browsers to achive this
purpose?
<link rel="stylesheet " type="text/css" media="print" href="print.css "
/>
<link href="style.css " type="text/css" media="screen" rel="stylesheet ">


If memory serves, you will want to list the print stylesheet last. Not
certain if that is necessary...

You do have that extra / at the end of the print line, though. You're
mixing HTML and XHTML.

--
-bts
-Warning: I brake for lawn deer
Nov 23 '05 #6
In article <11************ ********@z14g20 00cwz.googlegro ups.com>,
<ma*******@yaho o.com> wrote:
The footer consists of navigation links and copy right info.


Have you checked with the lawyers about not printing the copyright info?

--
= Eric Bustad, Norwegian bachelor programmer
Nov 23 '05 #7

Beauregard T. Shagnasty wrote:
ma*******@yahoo .com wrote:
Are the following stylesheet links work in all browsers to achive this
purpose?
<link rel="stylesheet " type="text/css" media="print" href="print.css "
/>
<link href="style.css " type="text/css" media="screen" rel="stylesheet ">


If memory serves, you will want to list the print stylesheet last. Not
certain if that is necessary...


Not in this case as screen and print are exclusive.
If you have a media="all" stylesheet then you probably want that listed
first so that styles with equal specificity in later media specific
stylesheets can over ride the media="all" rules.

Steve

Nov 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1125
by: Steve Robbins | last post by:
I need to create some reports for printing from my database. From everything I can find using Google, there doesn't seem to be any ways to override the default header and footer. Is this still true? Any good workarounds out there? Thanks for any help.
2
2479
by: Dragan Kovac | last post by:
Hello everyone, I have a problem. I generated some kind of my own report (by building HTML file) and now I want to print it. Printing itself is not a problem, problem is with adding custom headers and footers on every printed page. How can I do it? Some nice example would be reeeeally great! In header I want to put a picture, some text, and in footer I would like to have page counter and some small text displayed... I've heard...
5
5381
by: Niyazi | last post by:
Hi, I have an html page and I might be moving to asp.net page that contains a some kind of forum and string. It is kind of application form. User have to enter some (string) value into the forum which forum actualy similar to small article. Then user have to use PRINT button to print the page. My problem is that when I try to print it prints the HTML Name on top left as well as the page
0
1898
by: Niyazi | last post by:
Hi all, This my aspx page first line of code. <%@ Page CodeBehind="index.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="TB.index" %> Than inside head tag I have following script(s) --------------------------------------------------------------------------------------------------------------------- <script language="JavaScript"> //Disable Mouse Right Click Button
10
7553
by: sara | last post by:
I am STUCK! I have an Access2000 report; main report and subreport. The sub report is 2 columns, with a footer controlled by a value in a field. The Report Footer should have SUM of values in the report. My problem is that the Report footer of the Subreport doesn't print! The main report prints fine; the sub-report prints fine, except there
2
9274
by: LilBuh | last post by:
hi there :) i ve been looking for some time a way to print an html file from vb.net i came up with this code for printing and removing the header and footer from IE then once the printing is done restore the original header and footer Imports Microsoft.Win32 Private WithEvents myprocess As Process Private OldHeader As String
12
6385
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but of course it's thrown up a whole host of new issues... I'm generating a multi page printable document in HTML from my app, and displaying it in a WebBrowser control. I've looked into using some CSS
2
2914
by: Simon | last post by:
Dear reader, In case a report is a sub report the Report Header of the sub report is printed in the report but the Page Header of the sub report will not be printed. This is the same for Page Footer of the sub report. Is there a possibility to force printing Page Header and Page Footer of a sub report.
0
5326
by: Andrew Meador | last post by:
I have implemented a printing scenario where an html file is printed using the the following code: public void PrintHtmlFile(string url) { RegistryKey IERegKey; string header = null; string footer = null; object o = null; InternetExplorerClass ie = null;
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10578
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.