How to print web page without images on it and menu
I am using window.print() to print the page and it is working properly.
My problem is, I don't want to print images and menu, how to remove them at the time of printing?
2 Answers
You need to use print CSS
@media print
{
img {display:none;}
.menu{display:none;}
a {color:#000000;}
}
Search for print css and you will get many useful things.
|
1
|
Answered:
28 Feb 2013
Reputation: 296
|
|
There are two way to use the print CSS
First way: Use separate CSS file and at the time of linking add media = "print"
<link rel="stylesheet" type="text/css" href="style/print.css" media="print" />
Second way: in same CSS file which we use for our page add @media print
@media print
{
// your css code goes here.
}
|
0
|
Answered:
28 Feb 2013
Reputation: 1,109
|
|
This week users
