ok,
i have a php dcument that has a number of tables in. I want to be able to choose where the page break will be within the tables. e.g. i only want 3 tables per sheet of paper then the next 3 tables and so on. Is there an easy way to do this with css?
many thanks
It's called 'paged
It's called 'paged media'
Have a read through the specs to familiarize yourself with these properties. In use check thoroughly cross browser.
Guess which browser is going
Guess which browser is going to give you the most trouble.
IE?
IE?
TheStalker wrote:IE? You
IE?
You win! Or do we all lose? I forget.
It isn't going to give me
It isn't going to give me any problem :shrug: IE dosen't support them, tough; can't do much about that, still going to ensure that at least some browsers have a chance
kind of got it working using
kind of got it working using this
table{ page-break-after:always }
but IE prints an extra page at the end. Also Really wanted it to work using the
div{ page-break-after:always }
but it dosnt work at all
PDF is the way to go,
PDF is the way to go, browser printing is largely a waste of time if you need any sort of real layout control.
im starting to think the
im starting to think the same thing. Although its wired why it works with the table and not with div as i want 3 tables then the next 3 table etc etc.... :?
ok this now
ok this now works
div{ page-break-after : always; } <div> {code here} </div>
IE still prints an extra page off, where firefox does'nt. Is this IE just being IE or is there a way i can fix it ??
RE: ok this now
try using page-break-before:always; instead and put the div in the beginning of your loop.
NOTE: i'm not PHP expert, but something like this
for ( $counter = 0; $counter <= upperbound; $counter += 1) { if ( $counter % 3 == 0 ) { echo "<div style='page-break-before:always'></div>"; } echo "<table><tr><td>"; echo $counter; echo "</td></tr></table>"; }
this just gives me a blank
this just gives me a blank page at the begining
how about this....
how about this....
for ( $counter = 0; $counter <= upperbound; $counter += 1) { if ( ($counter % 3 == <img src="https://csscreator.com/sites/all/modules/smileys/packs/Roving/innocent.png" title="Innocent" alt="Innocent" class="smiley-content" /> && ($counter > <img src="https://csscreator.com/sites/all/modules/smileys/packs/Roving/innocent.png" title="Innocent" alt="Innocent" class="smiley-content" /> ) { echo "<div style='page-break-before:always'></div>"; } echo "<table><tr><td>"; echo $counter; echo "</td></tr></table>"; }