3

I have a php file with 's and the things in the div should stay on one page, for this possebillity i found this:

http://www.w3schools.com/css/pr_print_pagebi.asp

However like you can see its only compatible with opera and nothing more. I dont want to demand my users to use opera so I was wondering if there was a alternative to the "page-break-inside:avoid".

Thanks Matthy

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
matthy
  • 8,144
  • 10
  • 38
  • 47

1 Answers1

3

Support for print specific CSS is pretty crappy. Have a look at the CSS discuss Wiki for an extensive guide (it also has a link to a browser support compatibility table). I have had some success with page-break-before: always when I was playing around with this sort of thing a few weeks back - as long as your div is less than a page long you may be able to just force a page break before it?

robertc
  • 74,533
  • 18
  • 193
  • 177
  • 1
    I've had *some* success with that, too. You'll have a lot of issues with page breaks, though. I spent almost a day working on it, and I eventually had to just move on. We ultimately resorted to using blank divs with page-break-before and hoping things worked out ok...(cringe) – Jon Smock Aug 10 '09 at 01:07