Bullschmidt.com


     Home
     Web Database Concept
     How We Work Together
     Bio
     Web Database Sample
     Classic ASP Design Tips
     Bar Chart Tool
     Web Design Resources
     Access Database Sample

Classic ASP Design Tips
Do Not Print a Portion of the Page
These are opinions of J. Paul Schmidt, MBA.
No warranties are either expressed or implied.
To Use Paul's Services: Paul@Bullschmidt.com

Perhaps make it so that if a user prints a page that some things such as the top title portion, the left menu portion (as this can really expand the width of a printed page), and the bottom footer portion do not print.

Here's a snippet of code that can reside in a .css file:

/* Print. */
@media print {
  /* cssclsNoPrint class. */
  .cssclsNoPrint {display:none}
}

/* Screen. */
@media screen {
  /* cssclsNoScreen class. */
  .cssclsNoScreen {display:none}
}

And one can include the .css file in a Web page's header:

<link rel="stylesheet" type="text/css" href="style.css">

And for something intended to show up onscreen but not to show up when printing or doing print previews such a large logo or menu links at the left:

<span class="cssclsNoPrint">
  Blah, blah, blah<br>
  <img src="mylargelogo.gif" height="40" width="200"><br clear="all">
</span>

And for something intended to show up when printing or doing print previews but not onscreen such as perhaps printing a smaller logo than the main on screen logo:

<span class="cssclsNoScreen">
  <img src="mysmalllogo.gif" height="10" width="50"><br clear="all">
</span>





To Use Paul's Services:
Paul@Bullschmidt.com

Let's put some data on the Web!
Copyright © 2000-2018
J. Paul Schmidt, MBA
Freelance Web and Database Developer
All Rights Reserved

Privacy Policy