javascript - display content from specific div on print -


i want print content firefox. have inside html page <div id="printcontent"></div> hidden default. using css display div injected content on printing

@media print {         #printcontent{         display:block;     } } 

but on print preview i'm getting other page div, not #printcontent. should #printcontent on firefox print preview?

hide other content using display:none in media selector - i'd suggest #printcontent div child of body, can

@media print {         body>* {         display:none !important;     }     body>div#printcontent{         display:block !important;     } } 

edit: added !important - depending on other css may or may not need !important


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -