I created a wordpress website. My problem: Two icons are not displayed in the printed version.
Here comes my HTML code:
<p class="my_class_1">First sentence</p>
<p class="my_class_2">Second sentence </p>
My CSS which specifies the icons:
.my_class_1:before {
content: "";
display: block;
background: url("images/icon_1.png") no-repeat;
width: 20px;
height: 20px;
float: left;
margin: 0 6px 0 0;
}
.my_class_2:before {
content: "";
display: block;
background: url("images/icon_2.png") no-repeat;
width: 20px;
height: 20px;
float: left;
margin: 0 6px 0 0;
}
In the regular screen version both icons, icon_1 and icon_2, are displayed fine. In the printed version the sentences only are displayed, without icons – independent of the browser I’m using.
Anyone can guess what’s the problem?
Add the following and it will print.. Repeat for all instances
Here is a print to pdf test result. One withe @media and the other without