*
The moose likes HTML, CSS and JavaScript and the fly likes Page Breaking in HTML code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Page Breaking in HTML code?" Watch "Page Breaking in HTML code?" New topic
Author

Page Breaking in HTML code?

Ashwani Yadav
Ranch Hand

Joined: May 23, 2002
Posts: 33
Hello,
I am facing one problem in my HTML code,actually I have long HTML code that I am viewing by IE6/NN6.2.
What I want in this is that it should break in pages for printing purpose.
Sending you for your reference one sample code, here in this while I am viewing it through my browser's print preview the next page get displaced little bit below(you can check it by seeing both pages, the second page heading i.e Testing List gets displaced little bit below than its original place)...and I am having so many pages like this and every page gets displaced little bit below and so on..
Even though I tried it by putting the following lines of code in it:
<STYLE TYPE="text/css"> P { page-break-after: always } </STYLE>
<P CLASS="breakhere">
But this also is of no use...
Code is :
<html>
<head>
<title>Testing List</title>
<meta http-equiv="Content-Type" content="text/html; charset=shift_JIS">

</head>
<body>
<table align="center">
<tr>
<td nowrap>
<div>
<style>#f1{font:bold 14pt Tahoma;text-decoration:underline;color:#00007f}</style>
<span style="position:absolute;top:18pt;left:316pt" id=f1>Testing List</span>
<span style="position: absolute; top:4.5pt;left:13.5pt; width:126.0pt;height:47.3pt; ">
<img src=058018660.gif width=168 height=63 border=0">
</span>
<span style="position:absolute;top:594pt;left:316pt" id=f1>Testing List</span>
<span style="position: absolute; top:580.5pt;left:13.5pt; width:126.0pt;height:47.3pt; ">
<img src=058018660.gif width=168 height=63 border=0">
</span>
</div>
</td>
</tr>
</table>
</body>
</html>
 
Don't get me started about those stupid light bulbs.
 
subject: Page Breaking in HTML code?
 
Similar Threads
Images on Images using CSS
how to get image widt h and height?
Game Script??
Struts 2 div could not be viewed
xsl: html: getting attribute from other frame with refresh: Update info