blog.mha.dk
The on-line blog of Michael Holm Andersen

Force page break using CSS

Saturday, 21 July 2007 16:46 by mha

I'm currently working on a project which involves a lot of printing from the browser and needed to control page breaks. I found out that this can actually be achieved really simple using CSS. All you have to do is insert a tag like this before your page break:

<br style="page-break-before:always">

You can do other cool things, but that have to wait for another post :) .. MSDN contains more information about this - check it out!

Comments are closed