Looking for a way to create an HTML division using the div
element that is only visible when the print function is used (Ctrl+P) and not visible in the regular page view.
Unfortunately, I attempted the following method without success. Any advice or solutions would be greatly appreciated.
@media print {
.print_only {
display: block;
visibility: visible;
}
}
<div class="print_only" style="visibility:hidden; display:none"> THIS IS THE MOST DIFFICULT QUESTION OF THE CENTURY </div>