Skip to content Skip to sidebar Skip to footer

How To Print Html/php Page Without Including The Navigation Tab Contents, Footer, And Head Part

How to print HTML/PHP page without including the NAVIGATION TAB contents, FOOTER, and head part. I'm using plain HTML. I don't have CSS applied on it because of the purpose of prin

Solution 1:

CSS Print Media Queries

There are CSS media queries specifically for printed media.

Example

@media print {
   header, footer, nav, aside {
      display: none;
   }
}

More information

Solution 2:

<styletype="text/css"media="print">@page 
    {
        size: auto;   /* auto is the initial value */margin: 0mm;  /* this affects the margin in the printer settings */
    }
 .navigation,.footer,.header
        {
          display:none;
        }
</style>

Solution 3:

you can use a print css by using css media types

<link rel="stylesheet" href="css/print_style.css" media="print" />

and in that

.header,.footer,.navigation
{
    display:none;
}

Post a Comment for "How To Print Html/php Page Without Including The Navigation Tab Contents, Footer, And Head Part"