Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: not2easy
The site I have built has a background defined in CSS. The graphic theme of a navigation bar is a part of the background; it is situated on the top of the web page and repeats throughout the site. The problem is that each web page that contains a larger chunk of information (takes more than one sheet of paper to print) prints out with the top graphic theme on every sheet of paper with the context over it. So, if a single web-page takes 10 sheets of paper to print, the theme is reproduced on every page of 10, while it needs to be printed only once on the top of the first sheet in the sequence. Is there a way to solve this problem? Just like in Microsoft Word one is provided with an option to suppress page-numbering on the first page, is there a code in CSS to suppress top-theme printing on every page extept the first one?
Please cc your replies to firstname.lastname@example.org
But I looked at a bookmarked site, and it appears there could possibly be an option. This site: svg1.com/css_help.shtml
shows a specification for background-repeat: with options of repeat¦norepeat
Does that do it?
>Is there a way to solve this problem?
Not to my knowledge, unless you make the background image so high, that it will cover 10 pages of length, or whatever it is that you need. But such a big image will take forever to load. My suggestion is that you separate the navigation area from the background and put it as a foreground image, wherever you want it.
It may be that my learned friends here know how to do what you want in Java Script, but that requires substantial programming skills, much greater than mine.
Printing from the web is a very tangled subject. CSS was originally conceived as a means of specifying display characteristics, but the W3C has also been wrestling with printer specific (or "paged media") extensions to CSS for several years. The problems are many - related to both the specific browser AND the printer software.
The short answer is, no. Marcia's suggestion of trying background-repeat:norepeat is worth a try, but just because it works on one browser/printer setup is no guarantee it will always work. This code was created for the monitor, not the printer, and even so, it's unevenly supported cross-browser and cross-platform (as is all of CSS so far).
I'd say your best bet is to create another "printer-friendly" version of the page and link it in some obvious place on the displayed page. In fact, one of the angles of attack taken by the W3C has been to allow a different document to be specified when the browser prints a page.
Here's a web page [w3.org] specifically on printing and CSS from the W3C. You may find some helpful info there as well.