Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.1k views
Welcome To Ask or Share your Answers For Others

1 Answer

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...