2010-07-31, 00:44:54
yojoe Wrote:Things you have to do, to print a page containing only content you want (only htnl&css, no php at all)Thanks a lot. I found another way to do the job but it is not as simple as yours.
1. create a .css, who shows only things you'd like to print from your site (you will have to hide some content inside it, because they may inherit styles from base css; use display: none style)
2. add this css for printing purposes
(watch the paths)Code:<link rel="stylesheet" type="text/css" href="print.css" media="print" />
3. add printing button (you may as well stylize it using css)
(This is a text link, you can place an img instead)Code:<a href="#" onclick="window.print(); return false;" title="Print page">Print</a>
good luck