If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
If you’re styling pages for print, you will need to control where the printed pages break. Here’s how to do it:
<div style=”height:1px”> </div>
<div id=”page 1″ style=”page-break-after: always”>
content goes here
</div>
I’m told the initial div (with the height of 1px) is needed in IE6 and haven’t yet tested whether this is true. All I can tell you is that this works in IE7 and Firefox. Put the complete content of the page within the DIV and the browser will force a page break once the div tag closes.
Use Facebook to Comment on this Post
Every now and again I work something out that, whilst simple enough, gives me a little thrill and makes the daily slog of coding and running a business worthwhile.
I’ve been creating a web application for a new client that involves an end user and a number of people he nominates all rating him on a scale of 1 to 9 on various personal traits. The data this generates needs to be presented in a nice report form to be printed out on a colour inkjet. I used ChartDirector to generate the various (very nice) charts and graphs (I’ll have more on this in a later entry) and spent a lot of time formatting this using tables (well, most of it is tabular after all) and using CSS to break pages (again, more later). [click to continue…]
Use Facebook to Comment on this Post