473,546 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Emulate paging in an HTML document.

I want to emulate paging in an HTML document. something like,

-------------------------
| |
| <DIV> |
| |
| <TABLE></TABLE> |
| |
| <TABLE></TABLE> |
| |
| </DIV> |
| |
| <DIV PAGEBREAK> |
| |
| <DIV> |
| |
| <TABLE></TABLE> |
| |
| <TABLE></TABLE> |
| |
| </DIV> |
| |
| |
| |

The DIVs( <DIV STYLE="width:'1 00%';position:r elative;"> ) are
positioned relative to the body, and the TABLEs ( <TABLE
STYLE="width:'8 0%';position:ab solute;left:'0P X';top:'0PX';"> ) are
positioned absolute to the DIVs.

Thus, when I print preview the document, I get two tables in each
page; however, in the display, the tables that are supposed to be in
the second page page overlap the ones that are in the first page. I
guess the reason is 'cos the DIVs' height will not consist of the sum
of the height of the child <TABLE> elements that are in it. ( I put a
border around the DIV and confirmed this. It takes only one
glyph/px/whatever.. )

Is it possible to acheive what I want to?? I dont know...

I would greatly appreciate any help.
Regards,
Rithish.
Jul 20 '05 #1
10 13653
Rithish wrote:
Is it possible to acheive what I want to?? I dont know...


Isn't there a CSS thing to force page breaks?

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced Perl programmer available: http://castleamber.com/
Jul 20 '05 #2
On 11 May 2004 07:32:09 -0700, Rithish <ri*****@dacafe .com> wrote:
I want to emulate paging in an HTML document.
To me, this is sort of like emulating sore, tired legs and feet in an
automobile, but I'll play ball.
The DIVs( <DIV STYLE="width:'1 00%';position:r elative;"> ) are
positioned relative to the body, and the TABLEs ( <TABLE
STYLE="width:'8 0%';position:ab solute;left:'0P X';top:'0PX';"> ) are
positioned absolute to the DIVs.

Thus, when I print preview the document, I get two tables in each
page; however, in the display, the tables that are supposed to be in
the second page page overlap the ones that are in the first page. I
guess the reason is 'cos the DIVs' height will not consist of the sum
of the height of the child <TABLE> elements that are in it. ( I put a
border around the DIV and confirmed this. It takes only one
glyph/px/whatever.. )


What your issue is, I'm not entirely sure. Have you read
http://www.w3.org/TR/CSS2/page.html#page-breaks ? If so, is your issue
that the page break is not working? I don't know much about this aspect of
CSS, perhaps there are support issues.

Is your div containing the tables as you desire, or not? I'm really not
clear on that.

Please create a live example and post a URL so what you're asking can be
more lucent.
Jul 20 '05 #3
On Tue, 11 May 2004, John Bokma wrote:
Isn't there a CSS thing to force
CSS never "forces" anything. It only makes proposals, which the
client agent can action or not as it sees fit. That's an important
principle, not just a form of words.
page breaks?


Not those either.
Jul 20 '05 #4
John Bokma wrote:
Isn't there a CSS thing to force page breaks?


[bearing in mind A.Flavell's comments about "force" and css]

AFAIK, css pagination support is extremely poor. I think only Opera has
made even an attempt to support it, and it has not succeeded. You might
learn more by Googling for Mozilla css @page and Opera css @page. (Don't
bother with MSIE!)

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #5
Brian wrote:
John Bokma wrote:
Isn't there a CSS thing to force page breaks?


[bearing in mind A.Flavell's comments about "force" and css]


Indeed, should have written "suggest" or "kindly request" not force.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced Perl programmer available: http://castleamber.com/
Jul 20 '05 #6
Brian wrote:
John Bokma wrote:
Isn't there a CSS thing to force page breaks?

[bearing in mind A.Flavell's comments about "force" and css]

AFAIK, css pagination support is extremely poor. I think only Opera has
made even an attempt to support it, and it has not succeeded. You might
learn more by Googling for Mozilla css @page and Opera css @page. (Don't
bother with MSIE!)


<div style="page-break-before: always;"> seems to work in Mozilla.

= Eric

Jul 20 '05 #7
On Tue, 11 May 2004, Alan J. Flavell wrote:
CSS never "forces" anything. It only makes proposals, which the
client agent can action or not as it sees fit. That's an important
principle, not just a form of words.
page breaks?


Not those either.


My apologies: I hadn't meant to be so brusque at the end. But as
others have already noted, browser support for this is still quite
poor, and I can't offer you anything more positive, I'm afraid.
Jul 20 '05 #8
> What your issue is, I'm not entirely sure.

Pardon me for not stating my issue clearly... I am yet a novice.. :D
My issue is not breaking of pages... CSS style 'Page-break' works
fine. The issue is the display of these elements as contiguous.

Is your div containing the tables as you desire, or not? I'm really not
clear on that.

Please create a live example and post a URL so what you're asking can be
more lucent.


I am sorry that I will be unable to post a URL... However, I will try
to explain with an example...

I will take a scenario wherein I want to have two tables in two pages
of the document. The first table/s will be 48px from the top of the
page, and the second would be 96px from the top of the page. Hence, if
I do a print of the document, I will effectively get two pages, with
two tables each in them, like this,

Page 1
--------------------
| |
| <Table at 48px> |
| |
| |
| <Table at 96px> |
| |
--------------------

Page 2
--------------------
| |
| <Table at 48px> |
| |
| |
| <Table at 96px> |
| |
--------------------

However, when the html document is viewed(display) , the tables overlap
each other.. I mean, the tables of the second page, write over the
tables in the first page. I know this is 'cos of the CSS absolute
positioning of elements.
I believed the DIV to bloat up to accomodate the TABLEs specified in
it. Hence, when the next DIV is relatively positioned to the previous,
four tables could be viewed, one below the other... This is my
requirement...

The code snippet for this is as below,

<DIV STYLE="width:'1 00%';position:r elative;BORDER-TOP:'1PX SOLID
BLUE';BORDER-LEFT:'1PX SOLID BLUE';BORDER-RIGHT:'1PX SOLID
BLUE';BORDER-BOTTOM:'1PX SOLID BLUE';">

<TABLE HEIGHT="48PX" STYLE="width:'8 0%';BORDER-TOP:'1PX SOLID
BLACK';BORDER-LEFT:'1PX SOLID BLACK';BORDER-RIGHT:'1PX SOLID
BLACK';BORDER-BOTTOM:'1PX SOLID
BLACK';position :absolute;left: '0PX';top:'0PX' ;">
<TR>
<TD ALIGN=CENTER VALIGN=MIDDLE>T est1</TD>
</TR>
</TABLE>

<TABLE HEIGHT="48PX" STYLE="width:'6 0%';BORDER-TOP:'1PX SOLID
BLACK';BORDER-LEFT:'1PX SOLID BLACK';BORDER-RIGHT:'1PX SOLID
BLACK';BORDER-BOTTOM:'1PX SOLID
BLACK';position :absolute;left: '0PX';top:'96PX ';">
<TR>
<TD ALIGN=CENTER VALIGN=MIDDLE>T est2</TD>
</TR>
</TABLE>

</DIV>
<DIV STYLE="PAGE-BREAK-AFTER:always;po sition:relative ;"></DIV>
<DIV STYLE="width:'1 00%';position:r elative; BORDER-TOP:1PX SOLID RED;
BORDER-LEFT:1PX SOLID RED; BORDER-RIGHT:1PX SOLID RED;
BORDER-BOTTOM:1PX SOLID RED;">

<TABLE HEIGHT="48PX" STYLE="width:'8 0%';BORDER-TOP:'1PX SOLID
BLACK';BORDER-LEFT:'1PX SOLID BLACK';BORDER-RIGHT:'1PX SOLID
BLACK';BORDER-BOTTOM:'1PX SOLID
BLACK';position :absolute;left: '0PX';top:'0PX' ;">
<TR>
<TD ALIGN=CENTER VALIGN=MIDDLE>T est3</TD>
</TR>
</TABLE>

<TABLE HEIGHT="48PX" STYLE="width:'6 0%';BORDER-TOP:'1PX SOLID
BLACK';BORDER-LEFT:'1PX SOLID BLACK';BORDER-RIGHT:'1PX SOLID
BLACK';BORDER-BOTTOM:'1PX SOLID
BLACK';position :absolute;left: '0PX';top:'96PX ';">
<TR>
<TD ALIGN=CENTER VALIGN=MIDDLE>T est4</TD>
</TR>
</TABLE>

</DIV>

You will note that the tables are encompassed and absolutely
positioned inside and wrt a DIV. Thus each DIV would emulate a page...

This is the best my vocabulary can do... I hope I have stated my
point.. I greatly appreciate your help folks...

Regards,
Rithish.
Jul 20 '05 #9
ri*****@dacafe. com (Rithish) wrote:
My issue is not breaking of pages... CSS style 'Page-break' works
fine. The issue is the display of these elements as contiguous. I will take a scenario wherein I want to have two tables in two pages
of the document. The first table/s will be 48px from the top of the
page, and the second would be 96px from the top of the page. Hence, if
I do a print of the document, I will effectively get two pages, with
two tables each in them, like this,

Page 1
--------------------
| |
| <Table at 48px> |
| |
| |
| <Table at 96px> |
| |
--------------------

Page 2
--------------------
| |
| <Table at 48px> |
| |
| |
| <Table at 96px> |
| |
--------------------

However, when the html document is viewed(display) , the tables overlap
each other.. I mean, the tables of the second page, write over the
tables in the first page. I know this is 'cos of the CSS absolute
positioning of elements.
You're obviously trying to achieve something a bit trickier than this
though, or you wouldn't need positioning at all.

I believed the DIV to bloat up to accomodate the TABLEs specified in
it. Hence, when the next DIV is relatively positioned to the previous,
four tables could be viewed, one below the other... This is my
requirement.


To get what you're describing, just leave all the positioning out,
except the page-break between table 2 and table 3. So what are you
really after?
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4679
by: RelaxoRy | last post by:
Reposted (not sure if got sent) I have results being displayed each with its own checkbox name "selected" and value "id". When someone checks a checkbox, and then continues to page through the data (mysql select), I want that checkbox to be remembered. Basically I want the user to have multiple selections of checkboxes when paging...
7
3532
by: R0bert Nev1lle | last post by:
Internet Explorer always presents me with a challenge (partial repost). The current issue involves emulating max-width in IE using the technique described by Svend Tofte. http://www.svendtofte.com/code/max_width_in_ie/ The CSS code uses JavaScript expressions and feeds the browser's width to the style. The CSS code follows. * html...
0
2717
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update not the whole page, but a portion of the page. Strangely enough the URL below ...
2
1592
by: bulk88 | last post by:
How can I emulate DOM level 1 removeChild in IE 4? I already figured out to emulate getElementById by doing this if((!document.getElementById) && document.all) {document.getElementById = function(id){return document.all;}; } Is there something similar for removeChild?
1
6397
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and binding it to a repeater control. This repeater control has multiple text boxes and buttons. Can you please tell me how can i do paging in this case ?...
0
2138
by: dnphamus13 | last post by:
I'm new to this and drowning right now. I would like to put my database online for viewing. I managed to do the filtering but i need to do PAGING as the XML doc get bigger. From what i understand this is what I need to do; transform the current XML doc with the filterring xsl, then somehow add the paging xsl. That's the part i'm having trouble...
2
6440
by: farhad13841384 | last post by:
Hi , I Hope You fine. I have some problem with this code for paging in asp.net this bottom code work correctly without any error but when I try to place separate code in .VB file then error is begin and occured .I want to separate this code and compiling .vb code using VBC.exe later .(bin/paging.dll) when do it like me so you retrive only <...
2
5500
by: wallconor | last post by:
Hi, I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my results page. - Recordset Paging works if no parameters are used in the recordset sql code (ie. simple sql code): SELECT * FROM db_name WHERE...
0
7507
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3492
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1922
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.