printing pages in browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wurdup
Forum Commoner
Posts: 39
Joined: Thu Apr 01, 2010 11:36 am

printing pages in browser

Post by wurdup »

I have 3 tables that get filled with names and addresses from a database which is to be printed off by using the browser print button. How to I make it so I can print the 3 tables on seperate pages? ie it strarts a new page when finished printing one table.
User avatar
mecha_godzilla
Forum Contributor
Posts: 375
Joined: Wed Apr 14, 2010 4:45 pm
Location: UK

Re: printing pages in browser

Post by mecha_godzilla »

You need to use CSS, specifically a stylesheet for the 'print' media option. I'm sure other users will be able to give some examples but have a look at this page and report back if it doesn't do what you need:

http://davidwalsh.name/css-page-breaks

HTH,

Mecha Godzilla
wurdup
Forum Commoner
Posts: 39
Joined: Thu Apr 01, 2010 11:36 am

Re: printing pages in browser

Post by wurdup »

hey cool thx i didnt even know page breaks existed. will try it out later
Post Reply