Lets say I have a header banner on a webpage I'm about to print. Instead of wasting someone's ink printing the entire block of the image, is there a way via css to replace the image with text of H1 size?
I usually just add the following to my style sheet:
.nodisplay
{
display: none;
}
@media print {
* {
background-color: white !important;
background-image: none !important;
}
.noprint
{
display: none;
}
}
And then assign the noprint class to elements which shouldn't be printed:
<div class="noprint">
</div>
And for your example, something like the following should work:
<img src="logo.png" class="noprint" ...>
<h1 class="nodisplay">Text Logo</h1>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With