Link to home
Start Free TrialLog in
Avatar of KIce
KIce

asked on

Page breaks in HTML?

Is it possible to setup page breaks in HTML?  I have documents with images in it and when I print from the browser, it prints half an image on one page and the other half on the other page.  Is it possible to just put page breaks so it will print where I want.  I still want to be able to scroll through the whole document.  
ASKER CERTIFIED SOLUTION
Avatar of hcyu
hcyu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DokiDoki
DokiDoki

It's easy!
Put this style stuff in your <head>

  <style>
    div.page {
      page-break-before: always
    }
  </style>

now, whenever you need to page break, add this:

<div class=page>&nbsp;</div>

This will work in IE4 and Up.

Example

This is page one.
<div class=page>&nbsp;</div>
This is page two.

-DokiDoki