English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a printer-friendly page but I want to put page break separator graphics in there that will not be displayed when printed. Can this be possible with CSS? Thanks.

2007-12-05 06:16:56 · 2 answers · asked by Ryan P 1 in Computers & Internet Programming & Design

2 answers

Yes, it is possible to provide different style sheet for printer and screen using media="print"/"screen" attribute when including CSS files. In printable CSS, just provide different version of style, that doesn't have graphic.

You can also add "media" attribute into in-line style that changes background image. For example:


2007-12-05 06:23:25 · answer #1 · answered by General Cucombre 6 · 0 0

You likely don't need a graphic (too time-consuming for load time!) ... just a div, like, say, in your css (external or in head:
div.breaker { clear: both; display: block; font-size: 1px; height: 1px;
line-height: 1px; margin: 0; padding: 0; page-break-before: always; }

(or... page-break-after: always; ... your preference! }

Then, in the file:

amper nbsp;


(That should be an ampersand there, but you know about our ol' buddy Yahoo! Answers...)

2007-12-05 06:24:55 · answer #2 · answered by fjpoblam 7 · 0 0

fedest.com, questions and answers