Solved

Printing page breaks

Posted on 2004-08-24
3
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Title # Comments Views Activity
Getting Started on web Development for an experienced C++ developer 7 160
Microsoft Edge 9 109
Swiper slider stops between pages 11 55
site launch date and last modified date 3 109
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

734 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