Solved

Printing page breaks

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Display recordset field HTML encoded 21 50
Advice on what platform to use for a web app for AWS 3 94
Form submit issue 11 80
Element alignment and word wrapping 9 61
Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

920 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

17 Experts available now in Live!

Get 1:1 Help Now