I have a problem that causes me headaches. I am trying to print a report and format it correctly using print.css, but it completely ignores my css every time. Has anyone had this problem before? I made sure the CSS file is in the correct directory, etc., but still no luck.
Here is my template:
Note. I use javascript to control the print button, and inside javascript there is a link to CSS. I also tried to put it only on an HTML page, but that didn't help.
... <script type="text/javascript"> function printContent(id){ str=document.getElementById(id).innerHTML newwin=window.open('','printwin','left=100,top=100,'+ 'width=900,height=400, scrollbars=1') newwin.document.write('<HTML>\n<HEAD>\n') newwin.document.write('<TITLE>Print Page</TITLE>\n') newwin.document.write('<link rel="stylesheet" type="text/css" '+ 'href="/media/css/print.css" media="print"/>\n') newwin.document.write('<script>\n') ...
Now for this project I am using Ubuntu 10.10 and Firefox 7. If that helps at all.
Edit
I installed the web developer toolbar for Firefox. This allows you to view the page as different media. Now when I press print, it shows all my style changes, but when I print, it does not follow them.
source share