Printing relative DIVs: large gap

Discussion in 'HTML' started by Jan Doggen, Apr 22, 2005.

  1. Jan Doggen

    Jan Doggen Guest

    Hello,

    If I print the code below from IE, I get a large vertical gap at the top of
    my first page. The size of the gap is proportional to the contents of the
    DIVs. Why is this, what's the workaround?
    Note that the <TABLE> is essential; if I leave that out, no problems.
    Thanks in advance!
    Jan

    <HTML>
    <HEAD>
    </HEAD>

    <body topmargin="0" leftmargin="0">
    <Table cellspacing=0 cellpadding=0 border=0 width=700>
    <TR><TD>
    <div style="position: relative">
    <Table Cellspacing=0 cellpadding=0 border=0 width=600>
    <TR><TD>Medewerker nummer 1</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    </table>
    </div>
    <div style="position: relative; page-break-before: always">
    <Table Cellspacing=0 cellpadding=0 border=0 width=600>
    <TR><TD>Medewerker nummer 2</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    </table>
    </div>
    </TD></TR>
    </TABLE>
    </BODY>
    </HTML>





    --
    ---------------------------------------------------------------------------
    Jan Doggen, QSA Halfweg, The Netherlands
    Please remove the spam blocker from my email address when replying directly
     
    Jan Doggen, Apr 22, 2005
    #1
    1. Advertising

  2. Jan Doggen

    Jan Doggen Guest

    Sorry the colspan="2" shouldn't be there. Makes no difference though
    Jan

    "Jan Doggen" <> wrote in message
    news:4268d174$0$148$4all.nl...
    > Hello,
    >
    > If I print the code below from IE, I get a large vertical gap at the top

    of
    > my first page. The size of the gap is proportional to the contents of the
    > DIVs. Why is this, what's the workaround?
    > Note that the <TABLE> is essential; if I leave that out, no problems.
    > Thanks in advance!
    > Jan
    >
    > <HTML>
    > <HEAD>
    > </HEAD>
    >
    > <body topmargin="0" leftmargin="0">
    > <Table cellspacing=0 cellpadding=0 border=0 width=700>
    > <TR><TD>
    > <div style="position: relative">
    > <Table Cellspacing=0 cellpadding=0 border=0 width=600>
    > <TR><TD>Medewerker nummer 1</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > </table>
    > </div>
    > <div style="position: relative; page-break-before: always">
    > <Table Cellspacing=0 cellpadding=0 border=0 width=600>
    > <TR><TD>Medewerker nummer 2</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > </table>
    > </div>
    > </TD></TR>
    > </TABLE>
    > </BODY>
    > </HTML>
    >
    >
    >
    >
    >
    > --
    > --------------------------------------------------------------------------

    -
    > Jan Doggen, QSA Halfweg, The Netherlands
    > Please remove the spam blocker from my email address when replying

    directly
    >
    >
     
    Jan Doggen, Apr 22, 2005
    #2
    1. Advertising

  3. Jan Doggen

    Jan Doggen Guest

    Solved: Printing relative DIVs: large gap

    Found it:
    I should not use "page-break-before: always" inside of a TABLE.
    I managed to write the surrounding TABLE out of our app and it works fine
    now

    Bye
    Jan


    "Jan Doggen" <> wrote in message
    news:4268df9e$0$146$4all.nl...
    > Sorry the colspan="2" shouldn't be there. Makes no difference though
    > Jan
    >
    > "Jan Doggen" <> wrote in message
    > news:4268d174$0$148$4all.nl...
    > > Hello,
    > >
    > > If I print the code below from IE, I get a large vertical gap at the top

    > of
    > > my first page. The size of the gap is proportional to the contents of

    the
    > > DIVs. Why is this, what's the workaround?
    > > Note that the <TABLE> is essential; if I leave that out, no problems.
    > > Thanks in advance!
    > > Jan
    > >
    > > <HTML>
    > > <HEAD>
    > > </HEAD>
    > >
    > > <body topmargin="0" leftmargin="0">
    > > <Table cellspacing=0 cellpadding=0 border=0 width=700>
    > > <TR><TD>
    > > <div style="position: relative">
    > > <Table Cellspacing=0 cellpadding=0 border=0 width=600>
    > > <TR><TD>Medewerker nummer 1</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > </table>
    > > </div>
    > > <div style="position: relative; page-break-before: always">
    > > <Table Cellspacing=0 cellpadding=0 border=0 width=600>
    > > <TR><TD>Medewerker nummer 2</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > <TR><TD Colspan="2">Persoonsgegevens</TD></TR>
    > > </table>
    > > </div>
    > > </TD></TR>
    > > </TABLE>
    > > </BODY>
    > > </HTML>
    > >
    > >
    > >
    > >
    > >
    > > --

    >
    > --------------------------------------------------------------------------
    > -
    > > Jan Doggen, QSA Halfweg, The Netherlands
    > > Please remove the spam blocker from my email address when replying

    > directly
    > >
    > >

    >
    >
     
    Jan Doggen, Apr 22, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mangm
    Replies:
    2
    Views:
    777
    mangm
    Dec 1, 2005
  2. chlori

    Gap in IE, no gap in FF

    chlori, Jan 19, 2006, in forum: HTML
    Replies:
    1
    Views:
    484
    kchayka
    Jan 19, 2006
  3. rich
    Replies:
    0
    Views:
    756
  4. Doug Miller

    Why the large gap at the end?

    Doug Miller, Jul 19, 2009, in forum: HTML
    Replies:
    6
    Views:
    396
    Doug Miller
    Jul 21, 2009
  5. maya
    Replies:
    4
    Views:
    265
Loading...

Share This Page