I'm using Bootstrap as my framework.
To print parts of page i use "printThis" jquery plugin.
When i print a table, the active class wont show.
Active is filled row (cell).
How can i fix this?
HTML/php
if($day == "Mån"){
$mark_monday = "active";
}
echo "<tr class='print_table_text ".$mark_monday."'>";
UPDATE CSS
I tried this, and only bold is in the print!?
I can see the "active" class added by bootstrap on webpage. But it´s not shown in the print.
.print_table_text {
font-size: 10px;
}
.print_table_text.active {
font-weight: bold;
background-color: #000000;
}
PrintTHis
<script>
$(document).ready(function () {
$('#print_btn').click(function () {
loadCSS: "css/printthis-print_all_usrs_time.css"
$('#usr_name, #list_usr_time, #sum_worked_time, #break_page').printThis();
});
});
</script>
UPDATE
I did remove the bootstrap class "active". And created an own class called grey. I used the style sheet to add background color grey. But the same problem accours. I can see the grey background in my browser, but not on the print.
$mark_monday = "bggrey";
.print_table_text.bggrey {
font-weight: bold;
background-color: #f5f5f5;
}
The bold attribute is on the print, but not the BG color.
Add this media query to your styles that will be applied for a print
@media print {
td.active {
background-color: #f5f5f5;
}
}