scout1idf Posted March 17, 2013 Share Posted March 17, 2013 I was wondering.... @media print{ table{ page-break-inside:avoid; }} .... only works with Opera, is there a work around for other browsers? It's for a personal project so switching from Firefox to Opera isn't a big deal, I just like Firefox better.... Link to comment Share on other sites More sharing options...
jeffman Posted March 17, 2013 Share Posted March 17, 2013 1. Always force a page break before the table. or 2. With JavaScript, do some math and force a break before the table only if the table is too big for the rest of the page. I've never tried any of this, but those are the first things I'd look into. I'll add that when I have set widths and margins on printed documents, I get irregular results, depending on the printer. YMMV. Link to comment Share on other sites More sharing options...
scout1idf Posted March 18, 2013 Author Share Posted March 18, 2013 Actually, I just used the example that was shown in the link for my question. What I'm using are <div>'s that are populated by my MYSQL database using PHP. Each one has a min-height but can expand depending on what's filling them so there isn't a set height. The actual declaration in my style sheet is.... @media print{div .holder{page-break-inside:avoid;}} Opera will work for me when I need to print out the information if there isn't a css solution to the browser problem...... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now