This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2005 > How to avoid printing a footer on a web page





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to avoid printing a footer on a web page
madhu2845@yahoo.com

2005-11-16, 6:46 pm

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?

Barbara de Zoete

2005-11-16, 6:46 pm

On Wed, 16 Nov 2005 17:03:41 +0100, <madhu2845@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?
>


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 |
`-------------------------------------------------- --<--@ ------------'
madhu2845@yahoo.com

2005-11-16, 6:46 pm

The footer consists of navigation links and copy right info.

madhu2845@yahoo.com

2005-11-16, 6:46 pm

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">

Beauregard T. Shagnasty

2005-11-16, 6:46 pm

madhu2845@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
Eric Kenneth Bustad

2005-11-17, 6:45 pm

In article <1132157413.640984.7300@z14g2000cwz.googlegroups.com>,
<madhu2845@yahoo.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
Steve Pugh

2005-11-18, 6:30 pm


Beauregard T. Shagnasty wrote:
> madhu2845@yahoo.com wrote:
>
>
> 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

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews