Solved

Printing page breaks

Posted on 2004-08-24
3
170 Views
Last Modified: 2010-04-06
I have a long HTML page, how do I define page breaks in the page so when I go out to print it, it prints new page where I defined?

Also is there any good websites on printing html, layouts, etc...


Thanks in advance
0
Comment
Question by:auduin
  • 2
3 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 100 total points
ID: 11888465
Hi

You can only do it with CSS, and it's only workable on recent browsers. (it might be IE-only not sure)

<html>
<head>
<style>
.pagebreakbefore {page-break-before:always;}
</style>
</head>
<body>
<div>
Content
</div>
<div class="pagebreakbefore"></div>
<div>
Next Page
</div>
</body>
</html>

Regards,
Zyloch
0
 

Author Comment

by:auduin
ID: 11888508
thanks that works fine.

How do I use CSS to remove title and footer.

The page has an ugly tile

Untitled Page 1 of 3

and an ugly footer that displays the URL status and date.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 11888524
Ah, well, that, unfortunately, is not yet possible. It's because some printers don't print out those headings and footers and some do, and it's purely an user option (to provide them convenience in knowing which site it came from, for instance). It's just the limitations of programming, nothing I can do about it, sorry.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to dynamically set the form action using jQuery.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now