Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

style="page-break-before:always not working

Status
Not open for further replies.

kdelucia

Programmer
Jan 26, 2007
2
US
I created a web page that is meant to be printed. It consists of a series of tables with page breaks between the tables. My code works perfect on IE on a PC and the pages break where they should. However, on Safari on OS X the page breaks aren't working. I've done some research and as far as I can tell this should work on Safari. Here is the line of code that should be doing the page break.

<p style="page-break-before:always;">a</p>

Earlier in my code I included:
<style type="text/css">

Does anyone have any pointers on how I can get the page break working?

Thanks!
 
I've worked with page-break a lot and it's quirky. If that doesn't seem to work, you can put a page break-after:always on the tables that get printed and it may work.

Not sure if you want to try it, but if it's not much to change, it's probably worth a shot.

<.

 
Thanks! What I ended up using was @media screen and @media print. The page breaks only apply to print, not the screen and I needed to specify that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top