Change text color of text when printing
I have a div with white text color.
Using css media queries.
@media print {
.myid_print_duo_name
{
z-index: 2;
position: absolute;
left: 0px;
top: 330px;
width: 303px;
height: 28px;
line-height: 28px;
text-align: center;
color: white !important;
font-weight: bold;
font-size: 20px;
font-family: "Times New Roman";
}
}
In my print preview, my text looks a little darker.
I thought it was ok, but then the printed result is really the same in my preview. Why is it getting a little darker?
+3
source to share
3 answers
Some browsers have a property print-color-adjust
that can darken some colors and lighten others. Try adding these to your CSS:
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
Taken from Smashing site: http://www.smashingmagazine.com/2013/03/08/tips-and-tricks-for-print-style-sheets/
+1
source to share