Previously, the following code works fine for both Firefox and Google Chrome, when I print to βhideβ an element,
<!DOCTYPE html> <html><head><title>Test</title> <style type="text/css"> @media print { .noprint { display: none; } } </style> </head> <body> <span class="noprint">abc</span> </body></html>
But now this does not work for both browsers. However, if I switch to this,
<!DOCTYPE html> <html><head><title>Test</title> <style type="text/css" media="print"> .noprint { display: none; } </style> </head> <body> <span class="noprint">abc</span> </body></html>
It will work in Firefox, but not in Google Chrome. Which solution works regardless of browser? (Or is there something wrong with my code?)
source share