1
was setting up a page to print with @media print, but when you click on print the content appears duplicated on two different sheets.
HTML
<div id="printable">CONTEÚDO</div>
CSS
@media print {
* {
background: transparent;
color: #000;
text-shadow: none;
filter: none;
-ms-filter: none;
}
body * { visibility: hidden !important; }
#printable, #printable * { visibility: visible !important; }
#printable {
position: fixed;
left: 20px;
top: 15px;
}
}
I understood, but when changing the position the content appears almost at the end of the page, since the visibility: Hidden only hides the elements.
– Elis Oliveira
@Elisoliveira, as I said, the reason for the duplicity of the content is position:fixede. Now if you are with another cosy problem to open another Question and put your new problem. I think you already know why it is happening... Now like you’re gonna do to fix it, it’s not to help you without more hints. The tip was to change the position, if you changed and spoiled something else now your problem is no longer duplicity...
– Caetano Sincero