Solved

Printing page breaks

Posted on 2004-08-24
3
173 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to count occurrences of each item in an array.

820 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