...

View Full Version : using '@media print' prevent areas of page printing, how to do the reverse?



jasonpc1
07-15-2011, 03:12 PM
<style type="text/css">
@media all {
.page-break { display: none; }
}

@media print
{
.page-break { display: block; page-break-before: always; }
}

@media print {
div.screenOnly { display: none; }
}
@media print {
div.noborder { border-width: 0px; border-style: none; }
}

</style>


<div class="screenOnly">
this shows on the screen
</div>

<div>this is printed</div>


what I am wanting to do is have a reverse of this so that all the areas i contain within a given <div class="printerOnly"></div> is not shown on the screen but is ready to be printed, when the print button is pressed of course. and all the other areas are not printed.

is this possible ?

Apostropartheid
07-15-2011, 09:47 PM
@media screen.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum